public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>, Asias He <asias@redhat.com>,
	Kent Overstreet <kmo@daterainc.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <andi@firstfloor.org>,
	Christoph Lameter <cl@gentwo.org>
Subject: Re: [PATCH-v5 0/6] target/vhost/iscsi: Add per-cpu ida tag pre-allocation for v3.12
Date: Tue, 3 Sep 2013 19:04:48 +0300	[thread overview]
Message-ID: <20130903160448.GA23632@redhat.com> (raw)
In-Reply-To: <1377917556-11955-1-git-send-email-nab@linux-iscsi.org>

On Sat, Aug 31, 2013 at 02:52:30AM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
> 
> Hi folks,
> 
> This is an updated -v5 series for adding tag pre-allocation support of
> target fabric descriptor memory, utilizing Kent's latest per-cpu ida
> bits and incorporates akpm's last round of feedback.  The full -v5
> changelog is included below.
> 
> The first patch is a standalone version of per-cpu-ida, seperate from
> the full idr rewrite from Kent that is still being discussed.  Jens has
> also expressed interest in a blk-mq conversion to use these per-cpu-ida
> primatives, so getting this piece merged for v3.12 would make life easier
> for both of us.  ;)
> 
> The second patch includes target-core setup of se_sess->sess_cmd_map +
> se_sess->sess_tag_pool resources at session creation time, using
> fabric independent code in transport_init_session_tags().
> 
> The third patch is the initial conversion of vhost-scsi fabric code
> to use per-cpu ida logic for obtaining a new tcm_vhost_cmd descriptor
> via vhost_scsi_get_tag() during vhost_work_fn_t->handle_kick() ->
> vhost_scsi_handle_vq() callback execution.
> 
> The forth patch is a vhost-scsi change that adds pre-allocation of
> per tcm_vhost_cmd descriptor scatterlist + user-space page pointer
> memory, that allows the last two fast-path allocations to be dropped
> from tcm_vhost_submission_work() -> vhost_scsi_map_to_sgl() fast-path
> execution.
> 
> The fifth patch converts iscsi/iser-target to use allocations based on
> iscsit_transport->priv_size within iscsit_allocate_cmd(), instead of
> using an embedded isert_cmd->iscsi_cmd.  This makes the conversion to
> percpu-ida pre-allocation easier.
> 
> And the sixth patch enables iscsi-target to use pre-allocation logic for
> per-cpu session tag pooling with internal ida_alloc() + ida_free() calls
> based upon the saved iscsi_cmd->se_cmd.map_tag id.

For the vhost changes:
Acked-by: Michael S. Tsirkin <mst@redhat.com>



> v5 changes:
> 
>   - Change percpu_ida->cpus_have_tags to cpumask_t (kmo + akpm)
>   - Add comment for percpu_ida_cpu->lock + ->nr_free (kmo + akpm)
>   - Convert steal_tags() to use cpumask_weight() + cpumask_next() +
>     cpumask_first() + cpumask_clear_cpu() (kmo + akpm)
>   - Add comment for alloc_global_tags() (kmo + akpm)
>   - Convert percpu_ida_alloc() to use cpumask_set_cpu() (kmo + akpm)
>   - Convert percpu_ida_free() to use cpumask_set_cpu() (kmo + akpm)
>   - Drop percpu_ida->cpus_have_tags allocation in percpu_ida_init()
>     (kmo + akpm)
>   - Drop percpu_ida->cpus_have_tags kfree in percpu_ida_destroy()
>     (kmo + akpm)
>   - Add comment for percpu_ida_alloc @ gfp (kmo + akpm)
>   - Move to percpu_ida.c + percpu_ida.h (kmo + akpm + nab)
>   - Convert target/vhost/iscsi-target to use percpu_ida.h (nab)
> 
> Please review as v3.12 material.
> 
> Thank you,
> 
> --nab
> 
> Kent Overstreet (1):
>   idr: Percpu ida
> 
> Nicholas Bellinger (5):
>   target: Add transport_init_session_tags using per-cpu ida
>   vhost/scsi: Convert to per-cpu ida_alloc + ida_free command map
>   vhost/scsi: Add pre-allocation for tv_cmd SGL + upages memory
>   iscsi/iser-target: Convert to command priv_size usage
>   iscsi-target: Convert to per-cpu ida_alloc + ida_free command map
> 
>  drivers/infiniband/ulp/isert/ib_isert.c      |  114 +++------
>  drivers/infiniband/ulp/isert/ib_isert.h      |    2 +-
>  drivers/target/iscsi/iscsi_target.c          |   16 +--
>  drivers/target/iscsi/iscsi_target.h          |    1 -
>  drivers/target/iscsi/iscsi_target_configfs.c |    2 +-
>  drivers/target/iscsi/iscsi_target_core.h     |    3 +-
>  drivers/target/iscsi/iscsi_target_nego.c     |   28 ++-
>  drivers/target/iscsi/iscsi_target_util.c     |   41 ++--
>  drivers/target/target_core_transport.c       |   48 ++++
>  drivers/vhost/scsi.c                         |  132 ++++++++---
>  include/linux/percpu_ida.h                   |   59 +++++
>  include/target/iscsi/iscsi_transport.h       |    8 +-
>  include/target/target_core_base.h            |    5 +
>  include/target/target_core_fabric.h          |    3 +
>  lib/Makefile                                 |    5 +-
>  lib/percpu_ida.c                             |  335 ++++++++++++++++++++++++++
>  16 files changed, 652 insertions(+), 150 deletions(-)
>  create mode 100644 include/linux/percpu_ida.h
>  create mode 100644 lib/percpu_ida.c
> 
> -- 
> 1.7.2.5

      parent reply	other threads:[~2013-09-03 16:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-31  2:52 [PATCH-v5 0/6] target/vhost/iscsi: Add per-cpu ida tag pre-allocation for v3.12 Nicholas A. Bellinger
2013-08-31  2:52 ` [PATCH-v5 1/6] idr: Percpu ida Nicholas A. Bellinger
2013-09-03 16:06   ` Nicholas A. Bellinger
2013-09-04  1:27     ` Andrew Morton
2013-09-04  4:42       ` Nicholas A. Bellinger
2013-08-31  2:52 ` [PATCH-v5 2/6] target: Add transport_init_session_tags using per-cpu ida Nicholas A. Bellinger
2013-09-03  8:16   ` Asias He
2013-08-31  2:52 ` [PATCH-v5 3/6] vhost/scsi: Convert to per-cpu ida_alloc + ida_free command map Nicholas A. Bellinger
2013-08-31  2:52 ` [PATCH-v5 4/6] vhost/scsi: Add pre-allocation for tv_cmd SGL + upages memory Nicholas A. Bellinger
2013-09-03  8:13   ` Asias He
2013-08-31  2:52 ` [PATCH-v5 5/6] iscsi/iser-target: Convert to command priv_size usage Nicholas A. Bellinger
2013-08-31  2:52 ` [PATCH-v5 6/6] iscsi-target: Convert to per-cpu ida_alloc + ida_free command map Nicholas A. Bellinger
2013-09-03 16:04 ` Michael S. Tsirkin [this message]

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=20130903160448.GA23632@redhat.com \
    --to=mst@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=asias@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=cl@gentwo.org \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox