From: james.smart@broadcom.com (James Smart)
Subject: [PATCH 06/10] nvmet_fc: Reduce work_q count
Date: Mon, 15 May 2017 15:39:13 -0700 [thread overview]
Message-ID: <5ca80708-59d9-d7d1-6102-67ff2d1c1b8f@broadcom.com> (raw)
In-Reply-To: <5e0fefab-9a20-a409-8ff2-6eefe3ab1649@suse.de>
On 5/14/2017 11:40 PM, Hannes Reinecke wrote:
> On 05/13/2017 09:03 PM, James Smart wrote:
>> +static u32 nvmet_fc_cpu_cnt;
>> +static DEFINE_PER_CPU(struct nvmet_fc_work_by_cpu, nvmet_fc_cpu_workcpu);
>> +#define nvmet_fc_workcpu(cpu) (&per_cpu(nvmet_fc_cpu_workcpu, cpu))
>>
>> ...
>> +static void
>> +nvmet_fc_delete_workqueues(void)
>> +{
>> + struct nvmet_fc_work_by_cpu *workcpu;
>> + int i;
>> +
>> + for (i = 0; i < nvmet_fc_cpu_cnt; i++, workcpu++) {
>> + workcpu = nvmet_fc_workcpu(i);
>> +
>> + /* sanity check - all work should be removed */
>> + if (!list_empty(&workcpu->fod_list))
>> + pr_warn("%s: cpu %d worklist not empty\n", __func__, i);
>> +
>> + if (workcpu->work_q)
>> + destroy_workqueue(workcpu->work_q);
>> + }
>> +}
>> +
>> ...
>>
> Per-cpu ptr?
> Check drivers/scsi/fcoe/fcoe.c:fcoe_init() for reference.
As you can see above - I'm using per_cpu(), which is actually "#define
per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu))". So I'm already
using it.
-- james
next prev parent reply other threads:[~2017-05-15 22:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 19:02 [PATCH 00/10] outstanding nvme_fc/nvmet_fc fixes James Smart
2017-05-13 19:03 ` [PATCH 01/10] nvme_fc: get rid of local reconnect_delay James Smart
2017-05-15 6:20 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 02/10] nvme_fc: Support ctrl_loss_tmo James Smart
2017-05-15 6:21 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 03/10] nvme_fc: replace ioabort msleep loop with completion James Smart
2017-05-15 6:24 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 04/10] nvme_fc: revise comment on teardown James Smart
2017-05-15 6:25 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 05/10] nvme_fc: set logging level on resets/deletes James Smart
2017-05-15 6:26 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 06/10] nvmet_fc: Reduce work_q count James Smart
2017-05-15 6:40 ` Hannes Reinecke
2017-05-15 22:39 ` James Smart [this message]
2017-05-15 22:43 ` James Smart
2017-05-13 19:03 ` [PATCH 07/10] nvmet_fc: Add queue create and delete callbacks in LLDD api James Smart
2017-05-15 6:41 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 08/10] nvme_fc: remove extra controller reference taken on reconnect James Smart
2017-05-15 6:41 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 09/10] nvme_fcloop: fix port deletes and callbacks James Smart
2017-05-15 6:45 ` Hannes Reinecke
2017-05-13 19:03 ` [PATCH 10/10] nvme_fc: correct nvme status set on abort James Smart
2017-05-15 6:45 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ca80708-59d9-d7d1-6102-67ff2d1c1b8f@broadcom.com \
--to=james.smart@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.