Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-11 Thread Alexander Gordeev
On Sun, Jul 10, 2016 at 05:41:44AM +0200, Christoph Hellwig wrote: > On Mon, Jul 04, 2016 at 11:35:28AM +0200, Alexander Gordeev wrote: > > > mq_map is initialized to zero already, so we don't really need the > > > assignment for queue 0. The reason why this check exists is because > > > we start

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-09 Thread Christoph Hellwig
On Mon, Jul 04, 2016 at 11:35:28AM +0200, Alexander Gordeev wrote: > > mq_map is initialized to zero already, so we don't really need the > > assignment for queue 0. The reason why this check exists is because > > we start with queue = -1 and we never want to assignment -1 to mq_map. > > Would th

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-04 Thread Alexander Gordeev
On Mon, Jul 04, 2016 at 10:38:49AM +0200, Christoph Hellwig wrote: > On Mon, Jul 04, 2016 at 10:15:41AM +0200, Alexander Gordeev wrote: > > On Tue, Jun 14, 2016 at 09:59:04PM +0200, Christoph Hellwig wrote: > > > +static int blk_mq_create_mq_map(struct blk_mq_tag_set *set, > > > + const str

[PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-04 Thread Christoph Hellwig
Allow drivers to pass in the affinity mask from the generic interrupt layer, and spread queues based on that. If the driver doesn't pass in a mask we will create it using the genirq helper. As this helper was modelled after the blk-mq algorithm there should be no change in behavior. Signed-off-b

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-04 Thread Christoph Hellwig
On Mon, Jul 04, 2016 at 10:15:41AM +0200, Alexander Gordeev wrote: > On Tue, Jun 14, 2016 at 09:59:04PM +0200, Christoph Hellwig wrote: > > +static int blk_mq_create_mq_map(struct blk_mq_tag_set *set, > > + const struct cpumask *affinity_mask) > > +{ > > + int queue = -1, cpu = 0; > > +

Re: [PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-07-04 Thread Alexander Gordeev
On Tue, Jun 14, 2016 at 09:59:04PM +0200, Christoph Hellwig wrote: > +static int blk_mq_create_mq_map(struct blk_mq_tag_set *set, > + const struct cpumask *affinity_mask) > +{ > + int queue = -1, cpu = 0; > + > + set->mq_map = kzalloc_node(sizeof(*set->mq_map) * nr_cpu_ids, > +

[PATCH 11/13] blk-mq: allow the driver to pass in an affinity mask

2016-06-14 Thread Christoph Hellwig
Allow drivers to pass in the affinity mask from the generic interrupt layer, and spread queues based on that. If the driver doesn't pass in a mask we will create it using the genirq helper. As this helper was modelled after the blk-mq algorithm there should be no change in behavior. Signed-off-b