LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Khalid Aziz <khalid.aziz@oracle.com>
To: Mike Kravetz <mike.kravetz@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: "Matthew Wilcox" <willy@infradead.org>,
"Hugh Dickins" <hughd@google.com>,
"Andrea Arcangeli" <aarcange@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
"David Herrmann" <dh.herrmann@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH v4 3/3] mm: restructure memfd code
Date: Tue, 17 Apr 2018 17:42:57 -0600 [thread overview]
Message-ID: <3bcdcaba-3364-c633-2d9d-3df27c2a8f7c@oracle.com> (raw)
In-Reply-To: <20180415182119.4517-4-mike.kravetz@oracle.com>
On 04/15/2018 12:21 PM, Mike Kravetz wrote:
> With the addition of memfd hugetlbfs support, we now have the situation
> where memfd depends on TMPFS -or- HUGETLBFS. Previously, memfd was only
> supported on tmpfs, so it made sense that the code resided in shmem.c.
> In the current code, memfd is only functional if TMPFS is defined. If
> HUGETLFS is defined and TMPFS is not defined, then memfd functionality
> will not be available for hugetlbfs. This does not cause BUGs, just a
> lack of potentially desired functionality.
>
> Code is restructured in the following way:
> - include/linux/memfd.h is a new file containing memfd specific
> definitions previously contained in shmem_fs.h.
> - mm/memfd.c is a new file containing memfd specific code previously
> contained in shmem.c.
> - memfd specific code is removed from shmem_fs.h and shmem.c.
> - A new config option MEMFD_CREATE is added that is defined if TMPFS
> or HUGETLBFS is defined.
>
> No functional changes are made to the code: restructuring only.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
> fs/Kconfig | 3 +
> fs/fcntl.c | 2 +-
> include/linux/memfd.h | 16 +++
> include/linux/shmem_fs.h | 13 --
> mm/Makefile | 1 +
> mm/memfd.c | 345 +++++++++++++++++++++++++++++++++++++++++++++++
> mm/shmem.c | 324 --------------------------------------------
> 7 files changed, 366 insertions(+), 338 deletions(-)
> create mode 100644 include/linux/memfd.h
> create mode 100644 mm/memfd.c
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
prev parent reply other threads:[~2018-04-17 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-15 18:21 [PATCH v4 0/3] " Mike Kravetz
2018-04-15 18:21 ` [PATCH v4 1/3] mm/shmem: add __rcu annotations and properly deref radix entry Mike Kravetz
2018-04-15 18:21 ` [PATCH v4 2/3] mm/shmem: update file sealing comments and file checking Mike Kravetz
2018-04-17 23:40 ` Khalid Aziz
2018-04-15 18:21 ` [PATCH v4 3/3] mm: restructure memfd code Mike Kravetz
2018-04-17 23:42 ` Khalid Aziz [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=3bcdcaba-3364-c633-2d9d-3df27c2a8f7c@oracle.com \
--to=khalid.aziz@oracle.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dh.herrmann@gmail.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcandre.lureau@gmail.com \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=willy@infradead.org \
--subject='Re: [PATCH v4 3/3] mm: restructure memfd code' \
/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
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).