From: Hugh Dickins <hughd@google.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: Bob Liu <lliubbo@gmail.com>,
akpm@linux-foundation.org, rientjes@google.com,
kamezawa.hiroyu@jp.fujitsu.com, minchan.kim@gmail.com,
linux-mm@kvack.org
Subject: Re: [PATCH 1/2] ksm: clean up page_trans_compound_anon_split
Date: Tue, 6 Mar 2012 17:21:36 -0800 (PST) [thread overview]
Message-ID: <alpine.LSU.2.00.1203061717380.1431@eggly.anvils> (raw)
In-Reply-To: <20120307001148.GO13462@redhat.com>
On Wed, 7 Mar 2012, Andrea Arcangeli wrote:
> On Tue, Mar 06, 2012 at 03:28:43PM -0800, Hugh Dickins wrote:
> > On Thu, 1 Mar 2012, Bob Liu wrote:
> >
> > > Signed-off-by: Bob Liu <lliubbo@gmail.com>
> >
> > I agree it looks very much nicer: a patch on these lines would be good.
> >
> > But you've lost the comment about a return of 1 meaning "Retry later if
> > split_huge_page run from under us", which I think was a helpful comment.
> >
> > And you've not commented on the functional change which you made:
> > if page_trans_compound_anon() returns NULL, then _split() now returns
> > 1 where before it returned 0. I suspect that's a reasonable change
> > in a rare case, and better left simple as you have it, than slavishly
> > reproduce the earlier behaviour; but I'd like to have an Ack from the
> > author before we commit your modification.
>
> Yes, it's not a "noop", I just read the patch through the -mm flow a
> few sec after reading the above.
>
> > But you didn't Cc Andrea whose code this is, and who understands THP
> > and its races better than anybody: now Cc'ed.
>
> Thanks for CCing me. Returning 1 when page_trans_compound_anon returns
> NULL, should still be safe, because 1 triggers the bail out path, so
> it won't harm. It should be fully equivalent too because it would bail
> out later in the PageAnon check if page_trans_compound_anon returned 0
> (the function was invoked only on compound pages in the first place).
>
> So it looks fine.
Thanks, Andrea, that's good. So Bob, please resubmit with comment on
return value 1 reinstated, and in the commit description explain how
the slight change in operation is benign.
Thanks,
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-03-07 1:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 9:32 Bob Liu
2012-03-01 9:32 ` [PATCH 2/2] ksm: cleanup: introduce ksm_check_mm() Bob Liu
2012-03-01 20:51 ` Andrew Morton
2012-03-02 2:30 ` Bob Liu
2012-03-06 23:42 ` Hugh Dickins
2012-03-06 23:28 ` [PATCH 1/2] ksm: clean up page_trans_compound_anon_split Hugh Dickins
2012-03-07 0:11 ` Andrea Arcangeli
2012-03-07 0:26 ` Andrea Arcangeli
2012-03-07 10:39 ` Bob Liu
2012-03-07 15:47 ` Andrea Arcangeli
2012-03-07 1:21 ` Hugh Dickins [this message]
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=alpine.LSU.2.00.1203061717380.1431@eggly.anvils \
--to=hughd@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lliubbo@gmail.com \
--cc=minchan.kim@gmail.com \
--cc=rientjes@google.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