All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Shakeel Butt <shakeelb@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Roman Gushchin <guro@fb.com>, Rik van Riel <riel@surriel.com>,
	Minchan Kim <minchan@kernel.org>,
	Christian Brauner <christian@brauner.io>,
	Christoph Hellwig <hch@infradead.org>,
	Oleg Nesterov <oleg@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	Jann Horn <jannh@google.com>, Andy Lutomirski <luto@kernel.org>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Florian Weimer <fweimer@redhat.com>,
	Jan Engelhardt <jengelh@inai.de>,
	Tim Murray <timmurray@google.com>,
	Linux API <linux-api@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-team <kernel-team@android.com>
Subject: Re: [PATCH v3 1/2] mm: introduce process_mrelease system call
Date: Fri, 23 Jul 2021 10:53:50 +0200	[thread overview]
Message-ID: <YPqDnqULylkkzQG5@dhcp22.suse.cz> (raw)
In-Reply-To: <CAJuCfpGSZwVgZ=FxhCV-uC_mzC7O-v-3k3tm-F6kOB7WM9t9tw@mail.gmail.com>

On Fri 23-07-21 01:11:51, Suren Baghdasaryan wrote:
> On Thu, Jul 22, 2021, 11:20 PM Michal Hocko <mhocko@suse.com> wrote:
> 
> > On Thu 22-07-21 21:47:56, Suren Baghdasaryan wrote:
> > > On Thu, Jul 22, 2021, 7:04 PM Shakeel Butt <shakeelb@google.com> wrote:
> > >
> > > > On Thu, Jul 22, 2021 at 6:14 PM Suren Baghdasaryan <surenb@google.com>
> > > > wrote:
> > > > >
> > > > [...]
> > > > > +
> > > > > +       mmap_read_lock(mm);
> > > >
> > > > How about mmap_read_trylock(mm) and return -EAGAIN on failure?
> > > >
> > >
> > > That sounds like a good idea. Thanks! I'll add that in the next respin.
> >
> > Why is that a good idea? Can you do anything meaningful about the
> > failure other than immediately retry the syscall and hope for the best?
> >
> 
> I was thinking if this syscall implements "best effort without blocking"
> approach then for a more strict usage user can simply retry.

I do not think we really want to promise non blocking behavior at this
stage unless that is absolutely necessary. The current implementation
goes an extra mile to not block but I wouldn't carve it into stone via
userspace expectations.

> However
> retrying means issuing another syscall, so additional overhead...
> I guess such "best effort" approach would be unusual for a syscall, so
> maybe we can keep it as it is now and if such "do not block" mode is needed
> we can use flags to implement it later?

Yeah, an explicit opt-in via flags would be an option if that turns out
to be really necessary.
-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2021-07-23  8:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  1:14 [PATCH v3 1/2] mm: introduce process_mrelease system call Suren Baghdasaryan
2021-07-23  1:14 ` Suren Baghdasaryan
2021-07-23  1:14 ` [PATCH v3 2/2] mm: wire up syscall process_mrelease Suren Baghdasaryan
2021-07-23  1:14   ` Suren Baghdasaryan
2021-07-23  2:03 ` [PATCH v3 1/2] mm: introduce process_mrelease system call Shakeel Butt
2021-07-23  2:03   ` Shakeel Butt
2021-07-23  4:47   ` Suren Baghdasaryan
2021-07-23  6:20     ` Michal Hocko
2021-07-23  8:11       ` Suren Baghdasaryan
2021-07-23  8:15         ` David Hildenbrand
2021-07-23  8:18           ` Suren Baghdasaryan
2021-07-23  8:18             ` Suren Baghdasaryan
2021-07-23  8:53         ` Michal Hocko [this message]
2021-07-23 13:46           ` Shakeel Butt
2021-07-23 13:46             ` Shakeel Butt
2021-07-23 16:08             ` Suren Baghdasaryan
2021-07-23 16:08               ` Suren Baghdasaryan
2021-07-23 17:00               ` Shakeel Butt
2021-07-23 17:00                 ` Shakeel Butt
2021-07-26  7:27                 ` Michal Hocko
2021-07-26 13:43                   ` Shakeel Butt
2021-07-26 13:43                     ` Shakeel Butt
2021-08-02 19:53                     ` Suren Baghdasaryan
2021-08-02 19:53                       ` Suren Baghdasaryan
2021-08-02 20:05                       ` Shakeel Butt
2021-08-02 20:05                         ` Shakeel Butt
2021-08-02 20:08                         ` Suren Baghdasaryan
2021-08-02 20:08                           ` Suren Baghdasaryan
2021-08-02 22:16                           ` Suren Baghdasaryan
2021-08-02 22:16                             ` Suren Baghdasaryan
2021-07-23 13:40       ` Shakeel Butt
2021-07-23 13:40         ` Shakeel Butt
2021-07-26  8:20   ` Michal Hocko

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=YPqDnqULylkkzQG5@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=christian@brauner.io \
    --cc=david@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=jannh@google.com \
    --cc=jengelh@inai.de \
    --cc=kernel-team@android.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=minchan@kernel.org \
    --cc=oleg@redhat.com \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@google.com \
    --cc=surenb@google.com \
    --cc=timmurray@google.com \
    --cc=willy@infradead.org \
    /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 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.