Question about stream number

Jens Axboe axboe at kernel.dk
Tue May 15 08:23:15 PDT 2018


On 5/15/18 6:46 AM, dingxiang wrote:
> Hi,Jens
>      In current NVMe driver, the stream number is set to 4:
> 
>         /ctrl->nr_streams = min_t(unsigned, ctrl->nssa, BLK_MAX_WRITE_HINTS - 1);/
> 
>    Why the number is 4 rather than /ctrl->nssa? /

Because we only expose 4 different streams through the fcntl() get/set
rw hint API.

>    There is no limit in nvme spec 1.3, can I change it  if I need ?

There is a limit, but it's much higher :-)

There's nothing preventing you from changing it. But it would have to be
from an in-kernel user right now, since we don't have a way of passing
in more than 4 separate streams from userspace as it stands.

-- 
Jens Axboe




More information about the Linux-nvme mailing list