From: "Sandoval Castro, Luis Felipe" <luis.felipe.sandoval.castro@intel.com>
To: Michal Hocko <mhocko@kernel.org>, Andi Kleen <ak@linux.intel.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"vbabka@suse.cz" <vbabka@suse.cz>,
"mingo@kernel.org" <mingo@kernel.org>,
"rientjes@google.com" <rientjes@google.com>,
"n-horiguchi@ah.jp.nec.com" <n-horiguchi@ah.jp.nec.com>,
"salls@cs.ucsb.edu" <salls@cs.ucsb.edu>,
Cristopher Lameter <cl@linux.com>
Subject: RE: [PATCH v1] mm/mempolicy.c: Fix get_nodes() off-by-one error.
Date: Thu, 19 Oct 2017 03:48:09 +0000 [thread overview]
Message-ID: <A42BA8431884844BBC20FACB734718294A319F85@FMSMSX106.amr.corp.intel.com> (raw)
In-Reply-To: <20171013080403.izjxlrf7ap5zt2d5@dhcp22.suse.cz>
On Tue 18-10-17 10:42:34, Luis Felipe Sandoval Castro wrote:
Sorry for the delayed replay, from your feedback I don't think my
patch has any chances of being merged... I'm wondering though,
if a note in the man pages "range non inclusive" or something
like that would help to avoid confusions? Thanks
> On Thu 12-10-17 08:28:25, Andi Kleen wrote:
> > On Thu, Oct 12, 2017 at 10:46:33AM +0200, Michal Hocko wrote:
> > > [CC Christoph who seems to be the author of the code]
> >
> > Actually you can blame me. I did the mistake originally.
> > It was found many years ago, but then it was already too late
> > to change.
> >
> > > Andi has voiced a concern about backward compatibility but I am not
> sure
> > > the risk is very high. The current behavior is simply broken unless you
> > > use a large maxnode anyway. What kind of breakage would you envision
> > > Andi?
> >
> > libnuma uses the available number of nodes as max.
> >
> > So it would always lose the last one with your chance.
>
> I must be missing something because libnuma does
> if (set_mempolicy(policy, bmp->maskp, bmp->size + 1) < 0)
>
> so it sets max as size + 1 which is exactly what the man page describes.
>
> > Your change would be catastrophic.
>
> I am not sure which change do you mean here. I wasn't proposing any
> patch (yet). All I was saying is that the docuementation diagrees with
> the in kernel implementation. The only applications that would break
> would be those which do not comply to the documentation AFAICS, no?
> --
> Michal Hocko
> SUSE Labs
Best Regards,
Luis
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-10-19 3:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 13:36 [PATCH v1][cover-letter] mm/mempolicy.c: Fix get_nodes() off-by-one error Luis Felipe Sandoval Castro
2017-10-06 13:36 ` [PATCH v1] " Luis Felipe Sandoval Castro
2017-10-12 8:46 ` Michal Hocko
2017-10-12 9:14 ` Vlastimil Babka
2017-10-12 9:29 ` Michal Hocko
2017-10-12 15:28 ` Andi Kleen
2017-10-13 8:04 ` Michal Hocko
2017-10-19 3:48 ` Sandoval Castro, Luis Felipe [this message]
2017-10-19 4:28 ` Andi Kleen
2017-10-06 22:12 ` [PATCH v1][cover-letter] " Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2017-07-18 13:39 [PATCH v1] " Luis Felipe Sandoval Castro
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=A42BA8431884844BBC20FACB734718294A319F85@FMSMSX106.amr.corp.intel.com \
--to=luis.felipe.sandoval.castro@intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=salls@cs.ucsb.edu \
--cc=vbabka@suse.cz \
/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).