From: Ingo Molnar <mingo@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: mingo@elte.hu, Thomas Gleixner <tglx@linutronix.de>,
hpa@zytor.com, linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH v2] x86/mm: avoid premature success when changing page attributes
Date: Thu, 28 Jan 2016 09:42:32 +0100 [thread overview]
Message-ID: <20160128084232.GA24464@gmail.com> (raw)
In-Reply-To: <56A8B64A02000078000CB830@prv-mh.provo.novell.com>
* Jan Beulich <JBeulich@suse.com> wrote:
> When __change_page_attr() finds it necessary to call
> __cpa_process_fault(), it passes its return value directly up to its
> own caller, even if this indicates success. Success to the callers,
> however, means that whatever ->numpages currently holds is the count
> of successfully processed pages. The cases when __change_page_attr()
> calls __cpa_process_fault(), otoh, don't generally mean the entire
> range got processed (as can be seen from one of the two success return
> paths in __cpa_process_fault() adjusting ->numpages).
>
> When a top level caller, like in the case of change_page_attr_set_clr()
> only meaning to alter _PAGE_NX, wants to suppress alias processing, the
> boolean value to indicate so results in __cpa_process_fault() taking
> its other successful exit path. Since ->numpages so far didn't get
> adjusted there, hitting either of the conditions that cause
> __cpa_process_fault() to get called meant early termination of the
> processing without having processed the entire range, yet still
> reporting success.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> v2: Completely re-written description.
So maybe it's just me, but I'm still quite unhappy about this changelog, it's hard
to parse and doesn't really do what a good changelog should do :-/
First I'd like to quote from a mail of Andrew Morton:
"Please update the changelog to describe the current behavior.
Please also describe why you think that behavior should be changed.
ie: what's the reason for this patch.
Please update Documentation/ for this feature. Probably that's
kernel-parameters.txt for the boot option and sysctl/kernel.txt for the
procfs addition."
Alternatively:
1- first describe the symptoms of the bug - how does a user notice?
2- then describe how the code behaves today and how that is causing the bug
3- and then only describe how it's fixed.
Or:
" Current code does (A), this has a problem when (B).
We can improve this doing (C), because (D)."
This changelog concentrates excessively on implementational details, without
providing context and without touching upon the practical effects - nor does it do
a clear before/after description.
I.e. what you describe in the changelog is 90% of what a developer intimate with
this code finds interesting about the patch - but that's not what good changelogs
are about!
Could we try a v3?
Thanks,
Ingo
next prev parent reply other threads:[~2016-01-28 8:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 16:54 [PATCH] " Jan Beulich
2016-01-27 10:05 ` Thomas Gleixner
2016-01-27 10:44 ` Jan Beulich
2016-01-27 10:53 ` Thomas Gleixner
2016-01-27 11:10 ` Jan Beulich
2016-01-27 11:21 ` [PATCH v2] " Jan Beulich
2016-01-28 8:42 ` Ingo Molnar [this message]
2016-02-02 8:46 ` Jan Beulich
2016-02-09 14:30 ` Ingo Molnar
2016-02-10 9:03 ` [PATCH v3] " Jan Beulich
2016-02-25 9:45 ` [tip:x86/mm] x86/mm: Avoid " tip-bot for Jan Beulich
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=20160128084232.GA24464@gmail.com \
--to=mingo@kernel.org \
--cc=JBeulich@suse.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
Powered by JetHome