From: "Kirill A. Shutemov" <kirill@shutemov.name> To: Brian Geffon <bgeffon@google.com> Cc: Andrew Morton <akpm@linux-foundation.org>, "Michael S . Tsirkin" <mst@redhat.com>, Arnd Bergmann <arnd@arndb.de>, LKML <linux-kernel@vger.kernel.org>, linux-mm <linux-mm@kvack.org>, linux-api@vger.kernel.org, Andy Lutomirski <luto@amacapital.net>, Andrea Arcangeli <aarcange@redhat.com>, Sonny Rao <sonnyrao@google.com>, Minchan Kim <minchan@kernel.org>, Joel Fernandes <joel@joelfernandes.org>, Yu Zhao <yuzhao@google.com>, Jesse Barnes <jsbarnes@google.com> Subject: Re: [PATCH v2] mm: Add MREMAP_DONTUNMAP to mremap(). Date: Wed, 29 Jan 2020 13:46:55 +0300 [thread overview] Message-ID: <20200129104655.egvpavc2tzozlbqe@box> (raw) In-Reply-To: <CADyq12xCK_3MhGi88Am5P6DVZvrW8vqtyJMHO0zjNhvhYegm1w@mail.gmail.com> On Mon, Jan 27, 2020 at 05:35:40PM -0800, Brian Geffon wrote: > Hi Kirill, > Thanks for taking the time to look at this. I'll update the wording to > make it clear that MREMAP_FIXED is required with MREMAP_DONTUNMAP. I still think that chaining flags is strange. The new flag requires all existing. And based on the use case you probably don't really need 'fixed' semantics all the time. The user should be fine with moving the mapping *somewhere*, not neccessary to the given address. BTW, name of the flag is confusing. My initial reaction was that it is variant of MREMAP_FIXED that does't anything at the target address. Like MAP_FIXED vs. MAP_FIXED_NOREPLACE. Any better options for the flag name? (I have none) > Regarding rmap, you're completely right I'm going to roll a new patch > which will call unlink_anon_vmas() to make sure the rmap is correct, > I'll also explicitly check that the vma is anonymous and not shared > returning EINVAL if not, how does that sound? Fine, I guess. But let me see the end result. -- Kirill A. Shutemov
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org> To: Brian Geffon <bgeffon-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Cc: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>, "Michael S . Tsirkin" <mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>, LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, linux-mm <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>, Andrea Arcangeli <aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>, Sonny Rao <sonnyrao-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, Minchan Kim <minchan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Joel Fernandes <joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org>, Yu Zhao <yuzhao-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, Jesse Barnes <jsbarnes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Subject: Re: [PATCH v2] mm: Add MREMAP_DONTUNMAP to mremap(). Date: Wed, 29 Jan 2020 13:46:55 +0300 [thread overview] Message-ID: <20200129104655.egvpavc2tzozlbqe@box> (raw) In-Reply-To: <CADyq12xCK_3MhGi88Am5P6DVZvrW8vqtyJMHO0zjNhvhYegm1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> On Mon, Jan 27, 2020 at 05:35:40PM -0800, Brian Geffon wrote: > Hi Kirill, > Thanks for taking the time to look at this. I'll update the wording to > make it clear that MREMAP_FIXED is required with MREMAP_DONTUNMAP. I still think that chaining flags is strange. The new flag requires all existing. And based on the use case you probably don't really need 'fixed' semantics all the time. The user should be fine with moving the mapping *somewhere*, not neccessary to the given address. BTW, name of the flag is confusing. My initial reaction was that it is variant of MREMAP_FIXED that does't anything at the target address. Like MAP_FIXED vs. MAP_FIXED_NOREPLACE. Any better options for the flag name? (I have none) > Regarding rmap, you're completely right I'm going to roll a new patch > which will call unlink_anon_vmas() to make sure the rmap is correct, > I'll also explicitly check that the vma is anonymous and not shared > returning EINVAL if not, how does that sound? Fine, I guess. But let me see the end result. -- Kirill A. Shutemov
next prev parent reply other threads:[~2020-01-29 10:46 UTC|newest] Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-23 1:46 [PATCH] mm: Add MREMAP_DONTUNMAP to mremap() Brian Geffon 2020-01-23 1:46 ` Brian Geffon 2020-01-23 1:46 ` Brian Geffon 2020-01-23 3:02 ` Andy Lutomirski 2020-01-23 3:02 ` Andy Lutomirski 2020-01-23 18:47 ` Lokesh Gidra 2020-01-23 19:02 ` Brian Geffon 2020-01-23 19:03 ` Brian Geffon 2020-01-23 19:03 ` Brian Geffon 2020-01-24 19:06 ` [PATCH v2] " Brian Geffon 2020-01-24 19:06 ` Brian Geffon 2020-01-24 19:06 ` Brian Geffon 2020-01-26 5:16 ` Nathan Chancellor 2020-01-26 5:16 ` Nathan Chancellor 2020-01-27 2:21 ` Brian Geffon 2020-01-27 2:21 ` Brian Geffon 2020-01-27 2:21 ` Brian Geffon 2020-01-26 22:06 ` Kirill A. Shutemov 2020-01-26 22:06 ` Kirill A. Shutemov 2020-01-28 1:35 ` Brian Geffon 2020-01-28 1:35 ` Brian Geffon 2020-01-29 10:46 ` Kirill A. Shutemov [this message] 2020-01-29 10:46 ` Kirill A. Shutemov 2020-02-01 21:03 ` Brian Geffon 2020-02-01 21:03 ` Brian Geffon 2020-02-01 21:03 ` Brian Geffon 2020-02-02 4:17 ` Brian Geffon 2020-02-02 4:17 ` Brian Geffon 2020-02-03 13:09 ` Kirill A. Shutemov 2020-02-07 20:42 ` Brian Geffon 2020-02-07 20:42 ` Brian Geffon 2020-02-10 10:35 ` Kirill A. Shutemov 2020-02-10 10:35 ` Kirill A. Shutemov 2020-01-27 10:13 ` Florian Weimer 2020-01-27 10:13 ` Florian Weimer 2020-01-27 10:13 ` Florian Weimer 2020-01-27 22:33 ` Brian Geffon 2020-01-27 22:33 ` Brian Geffon 2020-01-27 22:33 ` Brian Geffon 2020-01-30 12:19 ` Florian Weimer 2020-01-30 12:19 ` Florian Weimer 2020-01-30 12:19 ` Florian Weimer 2020-01-27 4:46 ` [PATCH] " Dan Carpenter 2020-01-27 4:46 ` Dan Carpenter 2020-01-27 4:46 ` Dan Carpenter 2020-01-27 4:46 ` Dan Carpenter 2020-01-27 5:30 ` [PATCH v3] " Brian Geffon 2020-01-27 5:30 ` Brian Geffon 2020-01-27 5:30 ` Brian Geffon 2020-01-28 15:26 ` Will Deacon 2020-01-28 15:26 ` Will Deacon 2020-01-30 10:12 ` Will Deacon 2020-01-30 10:12 ` Will Deacon
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=20200129104655.egvpavc2tzozlbqe@box \ --to=kirill@shutemov.name \ --cc=aarcange@redhat.com \ --cc=akpm@linux-foundation.org \ --cc=arnd@arndb.de \ --cc=bgeffon@google.com \ --cc=joel@joelfernandes.org \ --cc=jsbarnes@google.com \ --cc=linux-api@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=luto@amacapital.net \ --cc=minchan@kernel.org \ --cc=mst@redhat.com \ --cc=sonnyrao@google.com \ --cc=yuzhao@google.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.