All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"kent.overstreet@gmail.com" <kent.overstreet@gmail.com>,
	"linux1394-devel@lists.sourceforge.net" 
	<linux1394-devel@lists.sourceforge.net>,
	"jgross@suse.com" <jgross@suse.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/2] Convert target drivers to use sbitmap
Date: Tue, 12 Jun 2018 11:08:43 -0700	[thread overview]
Message-ID: <20180612180843.GF19433@bombadil.infradead.org> (raw)
In-Reply-To: <0c93c72a3a339f3479f82de04223315671e07863.camel@wdc.com>

On Tue, Jun 12, 2018 at 04:32:03PM +0000, Bart Van Assche wrote:
> On Tue, 2018-06-12 at 09:15 -0700, Matthew Wilcox wrote:
> > On Tue, Jun 12, 2018 at 03:22:42PM +0000, Bart Van Assche wrote:
> > > Please introduce functions in the target core for allocating and freeing a tag
> > > instead of spreading the knowledge of how to allocate and free tags over all
> > > target drivers.
> > 
> > I can't without doing an unreasonably large amount of work on drivers that
> > I have no way to test.  Some of the drivers have the se_cmd already; some
> > of them don't.  I'd be happy to introduce a common function for freeing
> > a tag.
> 
> Which target drivers are you referring to? If you are referring to the sbp driver:
> I think that driver is dead and can be removed from the kernel tree. I even don't
> know whether that driver ever has had any users other than the developer of that
> driver.

For example tcm_fc:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                goto busy;

        cmd = &((struct ft_cmd *)se_sess->sess_cmd_map)[tag];

or qla2xxx:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                return NULL;

        cmd = &((struct qla_tgt_cmd *)se_sess->sess_cmd_map)[tag];

The core doesn't know at what offset from the pointer to store the tag
& cpu.  Only the individual drivers know their cmd layout.


WARNING: multiple messages have this Message-ID
From: Matthew Wilcox <willy@infradead.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "jgross@suse.com" <jgross@suse.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>,
	"linux1394-devel@lists.sourceforge.net"
	<linux1394-devel@lists.sourceforge.net>,
	"kent.overstreet@gmail.com" <kent.overstreet@gmail.com>
Subject: Re: [PATCH 1/2] Convert target drivers to use sbitmap
Date: Tue, 12 Jun 2018 11:08:43 -0700	[thread overview]
Message-ID: <20180612180843.GF19433@bombadil.infradead.org> (raw)
In-Reply-To: <0c93c72a3a339f3479f82de04223315671e07863.camel@wdc.com>

On Tue, Jun 12, 2018 at 04:32:03PM +0000, Bart Van Assche wrote:
> On Tue, 2018-06-12 at 09:15 -0700, Matthew Wilcox wrote:
> > On Tue, Jun 12, 2018 at 03:22:42PM +0000, Bart Van Assche wrote:
> > > Please introduce functions in the target core for allocating and freeing a tag
> > > instead of spreading the knowledge of how to allocate and free tags over all
> > > target drivers.
> > 
> > I can't without doing an unreasonably large amount of work on drivers that
> > I have no way to test.  Some of the drivers have the se_cmd already; some
> > of them don't.  I'd be happy to introduce a common function for freeing
> > a tag.
> 
> Which target drivers are you referring to? If you are referring to the sbp driver:
> I think that driver is dead and can be removed from the kernel tree. I even don't
> know whether that driver ever has had any users other than the developer of that
> driver.

For example tcm_fc:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                goto busy;

        cmd = &((struct ft_cmd *)se_sess->sess_cmd_map)[tag];

or qla2xxx:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                return NULL;

        cmd = &((struct qla_tgt_cmd *)se_sess->sess_cmd_map)[tag];

The core doesn't know at what offset from the pointer to store the tag
& cpu.  Only the individual drivers know their cmd layout.

WARNING: multiple messages have this Message-ID
From: Matthew Wilcox <willy@infradead.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "jgross@suse.com" <jgross@suse.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>,
	"linux1394-devel@lists.sourceforge.net"
	<linux1394-devel@lists.sourceforge.net>,
	"kent.overstreet@gmail.com" <kent.overstreet@gmail.com>
Subject: Re: [PATCH 1/2] Convert target drivers to use sbitmap
Date: Tue, 12 Jun 2018 18:08:43 +0000	[thread overview]
Message-ID: <20180612180843.GF19433@bombadil.infradead.org> (raw)
In-Reply-To: <0c93c72a3a339f3479f82de04223315671e07863.camel@wdc.com>

On Tue, Jun 12, 2018 at 04:32:03PM +0000, Bart Van Assche wrote:
> On Tue, 2018-06-12 at 09:15 -0700, Matthew Wilcox wrote:
> > On Tue, Jun 12, 2018 at 03:22:42PM +0000, Bart Van Assche wrote:
> > > Please introduce functions in the target core for allocating and freeing a tag
> > > instead of spreading the knowledge of how to allocate and free tags over all
> > > target drivers.
> > 
> > I can't without doing an unreasonably large amount of work on drivers that
> > I have no way to test.  Some of the drivers have the se_cmd already; some
> > of them don't.  I'd be happy to introduce a common function for freeing
> > a tag.
> 
> Which target drivers are you referring to? If you are referring to the sbp driver:
> I think that driver is dead and can be removed from the kernel tree. I even don't
> know whether that driver ever has had any users other than the developer of that
> driver.

For example tcm_fc:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                goto busy;

        cmd = &((struct ft_cmd *)se_sess->sess_cmd_map)[tag];

or qla2xxx:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                return NULL;

        cmd = &((struct qla_tgt_cmd *)se_sess->sess_cmd_map)[tag];

The core doesn't know at what offset from the pointer to store the tag
& cpu.  Only the individual drivers know their cmd layout.


WARNING: multiple messages have this Message-ID
From: Matthew Wilcox <willy@infradead.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"kent.overstreet@gmail.com" <kent.overstreet@gmail.com>,
	"linux1394-devel@lists.sourceforge.net"
	<linux1394-devel@lists.sourceforge.net>,
	"jgross@suse.com" <jgross@suse.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [1/2] Convert target drivers to use sbitmap
Date: Tue, 12 Jun 2018 11:08:43 -0700	[thread overview]
Message-ID: <20180612180843.GF19433@bombadil.infradead.org> (raw)

On Tue, Jun 12, 2018 at 04:32:03PM +0000, Bart Van Assche wrote:
> On Tue, 2018-06-12 at 09:15 -0700, Matthew Wilcox wrote:
> > On Tue, Jun 12, 2018 at 03:22:42PM +0000, Bart Van Assche wrote:
> > > Please introduce functions in the target core for allocating and freeing a tag
> > > instead of spreading the knowledge of how to allocate and free tags over all
> > > target drivers.
> > 
> > I can't without doing an unreasonably large amount of work on drivers that
> > I have no way to test.  Some of the drivers have the se_cmd already; some
> > of them don't.  I'd be happy to introduce a common function for freeing
> > a tag.
> 
> Which target drivers are you referring to? If you are referring to the sbp driver:
> I think that driver is dead and can be removed from the kernel tree. I even don't
> know whether that driver ever has had any users other than the developer of that
> driver.

For example tcm_fc:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                goto busy;

        cmd = &((struct ft_cmd *)se_sess->sess_cmd_map)[tag];

or qla2xxx:

        tag = sbitmap_queue_get(&se_sess->sess_tag_pool, &cpu);
        if (tag < 0)
                return NULL;

        cmd = &((struct qla_tgt_cmd *)se_sess->sess_cmd_map)[tag];

The core doesn't know at what offset from the pointer to store the tag
& cpu.  Only the individual drivers know their cmd layout.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-06-12 18:09 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 16:00 [PATCH 0/2] Use sbitmap instead of percpu_ida Matthew Wilcox
2018-05-15 16:00 ` Matthew Wilcox
2018-05-15 16:00 ` Matthew Wilcox
2018-05-15 16:00 ` [PATCH 1/2] Convert target drivers to use sbitmap Matthew Wilcox
2018-05-15 16:00 ` Matthew Wilcox
2018-05-15 16:00   ` [1/2] " Matthew Wilcox
2018-05-15 16:00   ` [PATCH 1/2] " Matthew Wilcox
2018-05-15 16:00   ` Matthew Wilcox
2018-05-15 16:11   ` Jens Axboe
2018-05-15 16:11     ` [1/2] " Jens Axboe
2018-05-15 16:11     ` [PATCH 1/2] " Jens Axboe
2018-05-15 16:20     ` Jens Axboe
2018-05-15 16:20     ` Jens Axboe
2018-05-15 16:20       ` [1/2] " Jens Axboe
2018-05-15 16:20       ` [PATCH 1/2] " Jens Axboe
2018-06-12  1:18     ` Jens Axboe
2018-06-12  1:18       ` [1/2] " Jens Axboe
2018-06-12  1:18       ` [PATCH 1/2] " Jens Axboe
2018-06-12  3:06       ` Matthew Wilcox
2018-06-12  3:06         ` [1/2] " Matthew Wilcox
2018-06-12  3:06         ` [PATCH 1/2] " Matthew Wilcox
2018-06-12  3:06         ` Matthew Wilcox
2018-05-15 16:11   ` Jens Axboe
2018-05-16  5:54   ` Felipe Balbi
2018-05-16  5:54     ` [1/2] " Felipe Balbi
2018-05-16  5:54     ` [PATCH 1/2] " Felipe Balbi
2018-05-16 12:47   ` kbuild test robot
2018-05-16 12:47   ` kbuild test robot
2018-05-16 12:47     ` [1/2] " kbuild test robot
2018-05-16 12:47     ` [PATCH 1/2] " kbuild test robot
2018-05-16 12:47   ` [RFC PATCH] iscsit_wait_for_tag() can be static kbuild test robot
2018-05-16 12:47   ` kbuild test robot
2018-05-16 12:47     ` [RFC] " kbuild test robot
2018-05-16 12:47     ` [RFC PATCH] " kbuild test robot
2018-05-16 12:47     ` kbuild test robot
2018-06-12 15:22   ` [PATCH 1/2] Convert target drivers to use sbitmap Bart Van Assche
2018-06-12 15:22     ` [1/2] " Bart Van Assche
2018-06-12 15:22     ` [PATCH 1/2] " Bart Van Assche
2018-06-12 15:22     ` Bart Van Assche
2018-06-12 16:15     ` Matthew Wilcox
2018-06-12 16:15     ` Matthew Wilcox
2018-06-12 16:15       ` [1/2] " Matthew Wilcox
2018-06-12 16:15       ` [PATCH 1/2] " Matthew Wilcox
2018-06-12 16:15       ` Matthew Wilcox
2018-06-12 16:32       ` Bart Van Assche
2018-06-12 16:32         ` [1/2] " Bart Van Assche
2018-06-12 16:32         ` [PATCH 1/2] " Bart Van Assche
2018-06-12 16:32         ` Bart Van Assche
2018-06-12 18:08         ` Matthew Wilcox [this message]
2018-06-12 18:08           ` [1/2] " Matthew Wilcox
2018-06-12 18:08           ` [PATCH 1/2] " Matthew Wilcox
2018-06-12 18:08           ` Matthew Wilcox
2018-05-15 16:00 ` [PATCH 2/2] Remove percpu_ida Matthew Wilcox
2018-05-15 16:00 ` Matthew Wilcox
2018-05-15 16:00   ` [2/2] " Matthew Wilcox
2018-05-15 16:00   ` [PATCH 2/2] " Matthew Wilcox

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=20180612180843.GF19433@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=jgross@suse.com \
    --cc=kent.overstreet@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=qla2xxx-upstream@qlogic.com \
    --cc=target-devel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --subject='Re: [PATCH 1/2] Convert target drivers to use sbitmap' \
    /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

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.