From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Toshi Kani <toshi.kani@hpe.com>,
Hillf Danton <hillf.zj@alibaba-inc.com>,
dan.j.williams@intel.com, mawilcox@microsoft.com,
hughd@google.com, kirill.shutemov@linux.intel.com,
linux-nvdimm@lists.01.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly
Date: Thu, 22 Sep 2016 19:33:34 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.11.1609221904020.19987@eggly.anvils> (raw)
In-Reply-To: <8737ksw69p.fsf@linux.vnet.ibm.com>
On Thu, 22 Sep 2016, Aneesh Kumar K.V wrote:
> Toshi Kani <toshi.kani@hpe.com> writes:
>
> > shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly,
> > which leads to a reversed effect of "huge=" mount option.
> >
> > Fix the check in shmem_get_unmapped_area().
> >
> > Note, the default value of SHMEM_SB(sb)->huge remains as
> > SHMEM_HUGE_NEVER. User will need to specify "huge=" option to
> > enable huge page mappings.
> >
>
> Any update on getting this merged ?
>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Yikes, how did we ever not notice this? Very embarrassing.
Huge thank you to Hillf for spotting it (only now do I rediscover
your June mail: I'm sorry, my attention has been fully elsewhere).
Big thank you to Toshi for sending the patch,
and to Aneesh for now sounding the alarm.
The only reassurance is that at least all the rest of it has
been under test for the last few months, via the SHMEM_HUGE_FORCE
override. So it's not as if none of the code has been tested,
but I am still mystified why it hasn't been obvious without.
To the patch,
Acked-by: Hugh Dickins <hughd@google.com>
but I wish I could dream up a more emphatic tag.
Andrew, please please grab this and send it in!
Thank you,
Hugh
>
> > Reported-by: Hillf Danton <hillf.zj@alibaba-inc.com>
> > Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Cc: Hugh Dickins <hughd@google.com>
> > ---
> > mm/shmem.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/shmem.c b/mm/shmem.c
> > index fd8b2b5..aec5b49 100644
> > --- a/mm/shmem.c
> > +++ b/mm/shmem.c
> > @@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(struct file *file,
> > return addr;
> > sb = shm_mnt->mnt_sb;
> > }
> > - if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER)
> > + if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER)
> > return addr;
> > }
> >
> >
> > --
--
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:[~2016-09-23 2:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 22:24 [PATCH 0/2] refactor shmem_get_unmapped_area() Toshi Kani
2016-09-09 22:24 ` [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly Toshi Kani
2016-09-12 9:59 ` Kirill A. Shutemov
2016-09-22 10:58 ` Aneesh Kumar K.V
2016-09-23 2:33 ` Hugh Dickins [this message]
2016-09-09 22:24 ` [PATCH 2/2] shmem: call __thp_get_unmapped_area to alloc a pmd-aligned addr Toshi Kani
2016-09-12 10:02 ` Kirill A. Shutemov
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.11.1609221904020.19987@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=toshi.kani@hpe.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