linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liam Howlett <liam.howlett@oracle.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mapletree-vs-khugepaged
Date: Tue, 17 May 2022 14:52:33 +0000	[thread overview]
Message-ID: <20220517145222.7onuxvc7ckbmx3e6@revolver> (raw)
In-Reply-To: <yt9dwnel4d4x.fsf@linux.ibm.com>

* Sven Schnelle <svens@linux.ibm.com> [220516 13:10]:
> Liam Howlett <liam.howlett@oracle.com> writes:
> 
> > * Sven Schnelle <svens@linux.ibm.com> [220516 11:37]:
> >> Hi Liam,
> >> 
> >> Liam Howlett <liam.howlett@oracle.com> writes:
> >> 
> >> > * Sven Schnelle <svens@linux.ibm.com> [220515 16:02]:
> >> >
> >> > I tried the above on my qemu s390 with kernel 5.18.0-rc6-next-20220513,
> >> > but it runs without issue, return code is 0.  Is there something the VM
> >> > needs to have for this to trigger?
> >> 
> >> A coworker said the same. Reason for this seems to be that i've run the
> >> code in a unittest environment which seems to make a difference. When
> >> compiling the code above with gcc on my system it also doesn't crash.
> >> So i have to figure out what makes this unittest binary special.
> >> 
> >> >> I've added a few debug statements to the maple tree code:
> >> >> 
> >> >> [   27.769641] mas_next_entry: offset=14
> >> >> [   27.769642] mas_next_nentry: entry = 0e00000000000000, slots=0000000090249f80, mas->offset=15 count=14
> >> >
> >> > Where exactly are you printing this?
> >> 
> >> I added a lot of debug statements to the code trying to understand
> >> it. I'll attach it to this mail.
> >
> > Thanks.  Can you check to see if that diff you sent was the correct
> > file?  It appears to be the git stats and not the changes themselves.
> 
> No, it wasn't. I did git stash show with -p, which doesn't make sense.
> I've attached the correct diff.

Thanks for this.  I think the key is that the offset is beyond the end
of the node (count).  What is happening is that we are already at the
last entry in the node and calling next.  I had moved the last entry
from the loop to optimize mas_next_nentry() and set it after.
Unfortunately I did not check for this condition on entry to the
function.  I have a patch I will send out shortly.

  reply	other threads:[~2022-05-17 14:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 17:20 [PATCH] mapletree-vs-khugepaged Guenter Roeck
2022-04-28 19:27 ` Liam Howlett
2022-04-29 12:09 ` Heiko Carstens
2022-04-29 13:01   ` Liam Howlett
2022-04-29 13:10     ` Heiko Carstens
2022-04-29 16:18       ` Liam Howlett
2022-05-02  9:10         ` Geert Uytterhoeven
2022-05-13 14:46   ` Sven Schnelle
2022-05-13 14:51     ` Sven Schnelle
2022-05-13 16:49     ` Andrew Morton
2022-05-13 17:00     ` Liam Howlett
2022-05-15 20:02       ` Sven Schnelle
2022-05-16 14:02         ` Liam Howlett
2022-05-16 15:37           ` Sven Schnelle
2022-05-16 15:50             ` Liam Howlett
2022-05-16 17:10               ` Sven Schnelle
2022-05-17 14:52                 ` Liam Howlett [this message]
2022-05-17 11:53       ` Heiko Carstens
2022-05-17 12:26         ` Heiko Carstens
2022-05-17 13:23         ` Guenter Roeck
2022-05-17 15:03           ` Liam Howlett
2022-05-17 16:28             ` Guenter Roeck
2022-05-17 20:38               ` Liam Howlett
2022-05-17 14:32         ` Guenter Roeck
2022-05-19 14:35           ` Liam Howlett
2022-05-19 21:41             ` Guenter Roeck
2022-05-19 22:38               ` Liam Howlett
2022-05-30 17:38               ` Liam Howlett
2022-05-31 18:56                 ` Liam Howlett
2022-06-01 19:06                   ` Liam Howlett
2022-05-13 17:28     ` Guenter Roeck
2022-05-13 20:12     ` Yang Shi

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=20220517145222.7onuxvc7ckbmx3e6@revolver \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@roeck-us.net \
    --cc=svens@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;
as well as URLs for NNTP newsgroup(s).