All of lore.kernel.org
 help / color / mirror / Atom feed
From: weiping zhang <zhangweiping@didichuxing.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block <linux-block@vger.kernel.org>,
	Weiping Zhang <zhangweiping@didiglobal.com>
Subject: Re: [PATCH v3 1/7] block: rename __blk_mq_alloc_rq_map
Date: Tue, 21 Apr 2020 21:17:32 +0800	[thread overview]
Message-ID: <20200421131732.GA20391@192.168.3.9> (raw)
In-Reply-To: <CACVXFVMsHg=nvkopcpEhZ53PPu8o6zO2MmycWO8k0hnE68EdcA@mail.gmail.com>

On Tue, Apr 21, 2020 at 09:25:49AM +0800, Ming Lei wrote:
> On Tue, Apr 21, 2020 at 4:42 AM Bart Van Assche <bvanassche@acm.org> wrote:
> >
> > On 4/6/20 12:36 PM, Weiping Zhang wrote:
> > > rename __blk_mq_alloc_rq_map to __blk_mq_alloc_rq_map_and_request,
> > > actually it alloc both map and request, make function name
> > > align with function.
> > >
> > > Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
> > > ---
> > >   block/blk-mq.c | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > > index f6291ceedee4..3a482ce7ed28 100644
> > > --- a/block/blk-mq.c
> > > +++ b/block/blk-mq.c
> > > @@ -2468,7 +2468,7 @@ static void blk_mq_init_cpu_queues(struct request_queue *q,
> > >       }
> > >   }
> > >
> > > -static bool __blk_mq_alloc_rq_map(struct blk_mq_tag_set *set, int hctx_idx)
> > > +static bool __blk_mq_alloc_rq_map_and_request(struct blk_mq_tag_set *set, int hctx_idx)
> > >   {
> > >       int ret = 0;
> > >
> > > @@ -2519,7 +2519,7 @@ static void blk_mq_map_swqueue(struct request_queue *q)
> > >               hctx_idx = set->map[HCTX_TYPE_DEFAULT].mq_map[i];
> > >               /* unmapped hw queue can be remapped after CPU topo changed */
> > >               if (!set->tags[hctx_idx] &&
> > > -                 !__blk_mq_alloc_rq_map(set, hctx_idx)) {
> > > +                 !__blk_mq_alloc_rq_map_and_request(set, hctx_idx)) {
> > >                       /*
> > >                        * If tags initialization fail for some hctx,
> > >                        * that hctx won't be brought online.  In this
> > > @@ -2983,7 +2983,7 @@ static int __blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)
> > >       int i;
> > >
> > >       for (i = 0; i < set->nr_hw_queues; i++)
> > > -             if (!__blk_mq_alloc_rq_map(set, i))
> > > +             if (!__blk_mq_alloc_rq_map_and_request(set, i))
> > >                       goto out_unwind;
> > >
> > >       return 0;
> >
> > What the __blk_mq_alloc_rq_map() function allocates is a request map and
> > requests. The new name is misleading because it suggests that only a
> > single request is allocated instead of multiple. The name
> > __blk_mq_alloc_rq_map_and_requests() is probably a better choice than
> > __blk_mq_alloc_rq_map_and_request().
> >
> > My opinion is that the old name is clear enough. I prefer the current name.
> 
> Also putting renaming patches before actual fix patches does make more trouble
> for backporting the fix to stable tree.
> 
> So please re-organize patches by fixing issues first, then following rename
> stuff.
OK, I reorder them.

Thanks
> 
> Thanks,
> Ming Lei

  reply	other threads:[~2020-04-21 13:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 19:35 [PATCH v3 0/7] Fix potential kernel panic when increase hardware queue Weiping Zhang
2020-04-06 19:36 ` [PATCH v3 1/7] block: rename __blk_mq_alloc_rq_map Weiping Zhang
2020-04-20 20:41   ` Bart Van Assche
2020-04-21  1:25     ` Ming Lei
2020-04-21 13:17       ` weiping zhang [this message]
2020-04-06 19:36 ` [PATCH v3 2/7] block: rename __blk_mq_alloc_rq_maps Weiping Zhang
2020-04-20 20:46   ` Bart Van Assche
2020-04-06 19:36 ` [PATCH v3 3/7] block: rename blk_mq_alloc_rq_maps Weiping Zhang
2020-04-20 20:47   ` Bart Van Assche
2020-04-06 19:36 ` [PATCH v3 4/7] block: free both map and request Weiping Zhang
2020-04-20 20:58   ` Bart Van Assche
2020-04-21 13:15     ` weiping zhang
2020-04-06 19:37 ` [PATCH v3 5/7] block: save previous hardware queue count before udpate Weiping Zhang
2020-04-20 21:00   ` Bart Van Assche
2020-04-06 19:37 ` [PATCH v3 6/7] block: refactor __blk_mq_alloc_rq_map_and_requests Weiping Zhang
2020-04-20 21:07   ` Bart Van Assche
2020-04-21 13:24     ` weiping zhang
2020-04-06 19:37 ` [PATCH v3 7/7] block: alloc map and request for new hardware queue Weiping Zhang
2020-04-08 12:25 ` [PATCH v3 0/7] Fix potential kernel panic when increase " Weiping Zhang
2020-04-20 11:15   ` Weiping Zhang
2020-04-20 19:30     ` Jens Axboe

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=20200421131732.GA20391@192.168.3.9 \
    --to=zhangweiping@didichuxing.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=tom.leiming@gmail.com \
    --cc=zhangweiping@didiglobal.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.