[PATCH] nvmet_fc: Reduce work_q count

James Smart jsmart2021 at gmail.com
Mon May 8 09:41:14 PDT 2017


On 5/8/2017 2:50 AM, Johannes Thumshirn wrote:
> Hi James,
>
> On 04/26/2017 01:22 AM, jsmart2021 at gmail.com wrote:
>>
>> +static u32 nvmet_fc_cpu_cnt;
>> +static struct nvmet_fc_work_by_cpu nvmet_fc_workcpu[NR_CPUS];
>
> Is there a reason that prevents you from using DEFINE_PER_CPU() here
> instead of that array?

Nope. I'll repost with the change.


>
> This do {} while(fod) construct looks a bit unusual to me. I do agree
> using a 'while (!list_empty(&workcpu->fod_list))' loop requires you two
> list_empty() calls (the 2nd would be in list_first_emtpy_or_null()) but
> is IMHO a bit more readable. Or am I missing something here?

Nope. It's not a big deal so I'll include this as well.

>
>> +
>> +static int
>> +nvmet_fc_create_threads(void)
>
> nvmet_fc_create_workqueues()? After all you're creating a workqueue not
> a kthread.

:)  sure.

-- james





More information about the Linux-nvme mailing list