public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Keith Busch <kbusch@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: "jiweisun126@126.com" <jiweisun126@126.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"axboe@fb.com" <axboe@fb.com>, "hch@lst.de" <hch@lst.de>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"ahuang12@lenovo.com" <ahuang12@lenovo.com>,
	"sunjw10@lenovo.com" <sunjw10@lenovo.com>
Subject: Re: [PATCH] nvme: add cond_resched() to nvme_complete_batch()
Date: Thu, 4 May 2023 10:12:46 +0000	[thread overview]
Message-ID: <ZFOFHv8Kh/7KLuBa@x1-carbon> (raw)
In-Reply-To: <ZFN9aWYCxJW/HdHi@x1-carbon>

On Thu, May 04, 2023 at 11:39:53AM +0200, Niklas Cassel wrote:
> On Wed, May 03, 2023 at 05:42:22PM -0600, Keith Busch wrote:
> > On Wed, May 03, 2023 at 10:28:53AM -0600, Keith Busch wrote:
> > > On Tue, May 02, 2023 at 08:54:12PM +0800, jiweisun126@126.com wrote:
> > > > According to the above two logs, we can know the nvme_irq() cost too much
> > > > time, in the above case, about 4.8 second. And we can also know that the
> > > > main bottlenecks is in the competition for the spin lock pool->lock.
> > > 
> > > I have a fix that makes pool->lock critical section much shorter and constant
> > > time. It was staged in mm tree for months, but mysteriously it's missing...
> > 
> > Well this is certainly odd: the commit I'm referring to is in Linus' log, but
> > the file it modified is not updated. What kind of 'git' madness is this??
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4de12a032fa6d0670aa0bb43a2bf9f812680d0f
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/mm/dmapool.c
> > 
> 
> Hmm, this is very interesting indeed.
> 
> It looks like:
> a4de12a032fa ("dmapool: link blocks across pages") matches
> https://patchwork.kernel.org/project/linux-mm/patch/20230126215125.4069751-12-kbusch@meta.com/
> so everything good.
> 
> However, the following commit:
> 2d55c16c0c54 ("dmapool: create/destroy cleanup")
> does not match what was on the list:
> https://patchwork.kernel.org/project/linux-mm/patch/20230126215125.4069751-13-kbusch@meta.com/
> 
> 
> 
> It kind of looks like
> 2d55c16c0c54 ("dmapool: create/destroy cleanup") is actually
> a revert of a4de12a032fa ("dmapool: link blocks across pages"),
> plus some additional changes. Scary.
> 
> 
> 
> Additionally, it seems like the fix:
> https://patchwork.kernel.org/project/linux-mm/patch/20230221165400.1595247-1-kbusch@meta.com/
> was never merged.
> 
> 
> Something is fishy here...
> 
> (Perhaps the maintainer did a git revert instead of applying the fix...
> and accidentally squashed the revert with a proper commit...
> But even that does not make sense, as there simply seems to be too many
> lines changed in 2d55c16c0c54 ("dmapool: create/destroy cleanup") for that
> to be the case...)

It seems like the additional lines in
2d55c16c0c54 ("dmapool: create/destroy cleanup") is explained by the
maintainer (probably accidentally) reverting additional patches in that
very same commit.

It seems like that commit reverted all changes to mm/dmapool.c since v6.3:

$ git log --oneline 2d55c16c0c54325bf15286cfa6ba6c268036b9e4 --not v6.3 mm/dmapool.c 
2d55c16c0c54 dmapool: create/destroy cleanup
a4de12a032fa dmapool: link blocks across pages
9d062a8a4c6d dmapool: don't memset on free twice
887aef615818 dmapool: simplify freeing
2591b516533b dmapool: consolidate page initialization
36d1a28921a4 dmapool: rearrange page alloc failure handling
52e7d5653979 dmapool: move debug code to own functions
19f504584038 dmapool: speedup DMAPOOL_DEBUG with init_on_alloc
347e4e44c0a9 dmapool: cleanup integer types
65216545436b dmapool: use sysfs_emit() instead of scnprintf()
7f796d141c07 dmapool: remove checks for dev == NULL


$ git diff v6.3 2d55c16c0c54325bf15286cfa6ba6c268036b9e4 mm/dmapool.c
<nothing>


Should probably tell Andrew so that he has time to send out a new PR
before the merge window closes. (I added him in To: .)

He should probably pick up this fix too:
https://patchwork.kernel.org/project/linux-mm/patch/20230221165400.1595247-1-kbusch@meta.com/


Kind regards,
Niklas

  reply	other threads:[~2023-05-04 10:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 12:54 [PATCH] nvme: add cond_resched() to nvme_complete_batch() jiweisun126
2023-05-03 16:07 ` Christoph Hellwig
2023-05-03 16:28 ` Keith Busch
2023-05-03 23:42   ` Keith Busch
2023-05-04  9:39     ` Niklas Cassel
2023-05-04 10:12       ` Niklas Cassel [this message]
2023-05-04 15:06         ` Keith Busch
2023-05-04 15:18           ` Niklas Cassel
2023-05-15 20:40 ` Keith Busch
2023-05-16 13:58   ` Jiwei Sun

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=ZFOFHv8Kh/7KLuBa@x1-carbon \
    --to=niklas.cassel@wdc.com \
    --cc=ahuang12@lenovo.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=jiweisun126@126.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sunjw10@lenovo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox