From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Toshi Kani <toshi.kani@hpe.com>, akpm@linux-foundation.org
Cc: linux-nvdimm@lists.01.org, mawilcox@microsoft.com,
hughd@google.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kirill.shutemov@linux.intel.com
Subject: Re: [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly
Date: Thu, 22 Sep 2016 16:28:10 +0530 [thread overview]
Message-ID: <8737ksw69p.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1473459863-11287-2-git-send-email-toshi.kani@hpe.com>
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>
> 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>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2016-09-22 10:58 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 [this message]
2016-09-23 2:33 ` Hugh Dickins
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=8737ksw69p.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.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