linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Alexey Dobriyan" <adobriyan@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Colin Cross" <ccross@google.com>,
	"Alexey Gladkov" <gladkov.alexey@gmail.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	"Michel Lespinasse" <walken@google.com>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Song Liu" <songliubraving@fb.com>,
	"Huang Ying" <ying.huang@intel.com>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Yang Shi" <yang.shi@linux.alibaba.com>,
	chenqiwu <chenqiwu@xiaomi.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Thomas Hellstrom" <thellstrom@vmware.com>,
	"Mike Christie" <mchristi@redhat.com>,
	"Bart Van Assche" <bvanassche@acm.org>,
	"Amit Pundir" <amit.pundir@linaro.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Christian Brauner" <christian.brauner@ubuntu.com>,
	"Daniel Jordan" <daniel.m.jordan@oracle.com>,
	"Adrian Reber" <areber@redhat.com>,
	"Nicolas Viennot" <Nicolas.Viennot@twosigma.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Thomas Cedeno" <thomascedeno@google.com>,
	linux-fsdevel@vger.kernel.org,
	"Pekka Enberg" <penberg@kernel.org>,
	"Dave Hansen" <dave.hansen@intel.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Jan Glauber" <jan.glauber@gmail.com>,
	"John Stultz" <john.stultz@linaro.org>,
	"Rob Landley" <rob@landley.net>,
	"Cyrill Gorcunov" <gorcunov@openvz.org>,
	"Serge E. Hallyn" <serge.hallyn@ubuntu.com>,
	"David Rientjes" <rientjes@google.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Rik van Riel" <riel@redhat.com>, "Mel Gorman" <mgorman@suse.de>,
	"Tang Chen" <tangchen@cn.fujitsu.com>,
	"Robin Holt" <holt@sgi.com>, "Shaohua Li" <shli@fusionio.com>,
	"Sasha Levin" <sasha.levin@oracle.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Minchan Kim" <minchan@kernel.org>
Subject: Re: [PATCH v5 2/2] mm: add a field to store names for private anonymous memory
Date: Wed, 19 Aug 2020 16:02:51 +0100	[thread overview]
Message-ID: <20200819150251.GD17456@casper.infradead.org> (raw)
In-Reply-To: <20200819141650.7462-3-sumit.semwal@linaro.org>

On Wed, Aug 19, 2020 at 07:46:50PM +0530, Sumit Semwal wrote:
> +++ b/include/linux/mm_types.h
> @@ -336,10 +336,18 @@ struct vm_area_struct {
>  	/*
>  	 * For areas with an address space and backing store,
>  	 * linkage into the address_space->i_mmap interval tree.
> +	 *
> +	 * For private anonymous mappings, a pointer to a null terminated string
> +	 * in the user process containing the name given to the vma, or NULL
> +	 * if unnamed.
>  	 */
> -	struct {
> -		struct rb_node rb;
> -		unsigned long rb_subtree_last;
> +
> +	union {
> +		struct {
> +			struct rb_node rb;
> +			unsigned long rb_subtree_last;
> +		} interval;
> +		const char __user *anon_name;
>  	} shared;

You can significantly reduce the size of this patch by doing this instead:

	union {
		struct {
			struct rb_node rb;
			unsigned long rb_subtree_last;
		} shared;
		const char __user *anon_name;
	};



  parent reply	other threads:[~2020-08-19 15:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 14:16 [PATCH v5 0/2] Anonymous VMA naming patches Sumit Semwal
2020-08-19 14:16 ` [PATCH v5 1/2] mm: rearrange madvise code to allow for reuse Sumit Semwal
2020-08-19 14:16 ` [PATCH v5 2/2] mm: add a field to store names for private anonymous memory Sumit Semwal
2020-08-19 14:37   ` Michal Hocko
2020-08-19 15:02   ` Matthew Wilcox [this message]
2020-08-19 17:48     ` Sumit Semwal
2020-08-20 15:46     ` Oleg Nesterov
2020-08-19 17:14   ` kernel test robot
2020-08-19 17:42   ` kernel test robot
2020-08-20  7:58   ` Michal Hocko
2020-08-20 23:28     ` Colin Cross
2020-08-21  3:21       ` Sumit Semwal
2020-08-21  7:24         ` Michal Hocko
2020-08-21  7:53           ` Michal Hocko
2020-08-21  8:02             ` Sumit Semwal
2020-08-20 16:00   ` Oleg Nesterov
2020-08-20 21:15     ` Kees Cook
2020-08-21  3:15       ` Sumit Semwal
2020-08-21  3:14     ` Sumit Semwal
2020-08-20 21:40   ` Cyrill Gorcunov
2020-08-20 21:45     ` Colin Cross
2020-08-20 22:15       ` Cyrill Gorcunov
2020-08-20 23:51         ` Colin Cross
2020-08-21  7:05           ` Cyrill Gorcunov
2020-08-20 21:45     ` Dave Hansen
2020-08-20 21:59       ` Cyrill Gorcunov

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=20200819150251.GD17456@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Nicolas.Viennot@twosigma.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.pundir@linaro.org \
    --cc=areber@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=ccross@google.com \
    --cc=chenqiwu@xiaomi.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=corbet@lwn.net \
    --cc=daniel.m.jordan@oracle.com \
    --cc=dave.hansen@intel.com \
    --cc=ebiederm@xmission.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=hannes@cmpxchg.org \
    --cc=holt@sgi.com \
    --cc=hughd@google.com \
    --cc=jan.glauber@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=john.stultz@linaro.org \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchristi@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=oleg@redhat.com \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=rob@landley.net \
    --cc=sasha.levin@oracle.com \
    --cc=serge.hallyn@ubuntu.com \
    --cc=shli@fusionio.com \
    --cc=songliubraving@fb.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=thellstrom@vmware.com \
    --cc=thomascedeno@google.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    --cc=walken@google.com \
    --cc=yang.shi@linux.alibaba.com \
    --cc=ying.huang@intel.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;
as well as URLs for NNTP newsgroup(s).