From: Aditya Gupta <adityag@linux.ibm.com>
To: Gavin Shan <gshan@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Danilo Krummrich <dakr@kernel.org>,
David Hildenbrand <david@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
linux-kernel@vger.kernel.org, Donet Tom <donettom@linux.ibm.com>
Subject: Re: [REPORT] Softlockups on PowerNV with upstream
Date: Thu, 10 Apr 2025 17:52:59 +0530 [thread overview]
Message-ID: <tm2pvk7ylatmou2gjcctz4dzyw3rudw5hgqsiax3eoxfkvsrmz@vuzh3xuepq6n> (raw)
In-Reply-To: <675d6580-814f-4fae-9dc5-9470645adc07@redhat.com>
Cc +donet
On 25/04/10 07:44PM, Gavin Shan wrote:
> On 4/10/25 6:23 PM, Oscar Salvador wrote:
> > On Thu, Apr 10, 2025 at 03:35:19PM +1000, Gavin Shan wrote:
> > > Thanks, Oscar. You're correct that the overhead is introduced by for_each_present_section_nr().
> > > I already had the fix, working on IBM's Power9 machine, where the issue can be
> > > reproduced. Please see the attached patch.
> > >
> > > I'm having most tests on ARM64 machine for the fix.
> >
> > Looks good to me.
> > But we need a comment explaining why block_id is set to ULONG_MAX
> > at the beginning as this might not be obvious.
> >
> > Also, do we need
> > if (block_id != ULONG_MAX && memory_block_id(nr) == block_id) ?
> >
> > Cannot just be
> >
> > if (memory_block_id(nr) == block_id) ?
> >
> > AFAICS, the first time we loop through 'memory_block_id(nr) == ULONG_MAX'
> > will evaluate false and and we will set block_id afterwards.
> >
> > Either way looks fine to me.
> > Another way I guess would be:
> >
>
> Yeah, we need to record the last handled block ID by @block_id. For the
> first time to register the block memory device in the loop, @block_id needs
> to be invalid (ULONG_MAX), bypassing the check of 'memory_block_id(nr) == block_id'.
> I will post the fix for review after Aditya confirms it works for him, with extra
> comment to explain why @block_id is initialized to ULONG_MAX.
>
> Aditya, please have a try when you get a chance, thanks! I verified it on Power9
> machine where the issue exists and on one of my ARM64 machine.
I don't see any softlockups now with your patch as well as Oscar's patch.
Tested on PowerNV Power10.
Thanks for the quick replies Gavin.
- Aditya G
>
> Thanks,
> Gavin
>
next prev parent reply other threads:[~2025-04-10 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 18:03 Aditya Gupta
2025-04-10 1:35 ` Gavin Shan
2025-04-10 11:38 ` Aditya Gupta
2025-04-10 5:25 ` Oscar Salvador
2025-04-10 5:35 ` Gavin Shan
2025-04-10 8:23 ` Oscar Salvador
2025-04-10 9:44 ` Gavin Shan
2025-04-10 11:49 ` Aditya Gupta
2025-04-10 12:22 ` Aditya Gupta [this message]
2025-04-10 12:32 ` Gavin Shan
2025-04-10 11:44 ` Aditya Gupta
2025-04-10 12:26 ` Aditya Gupta
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=tm2pvk7ylatmou2gjcctz4dzyw3rudw5hgqsiax3eoxfkvsrmz@vuzh3xuepq6n \
--to=adityag@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=david@redhat.com \
--cc=donettom@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=gshan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mahesh@linux.ibm.com \
--cc=osalvador@suse.de \
--cc=rafael@kernel.org \
--cc=sourabhjain@linux.ibm.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