[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjkiNPWb97JXV6=J6DzscB1g7moGJ6G_nSe=AEbMugTNw@mail.gmail.com>
Date: Thu, 31 Jan 2019 09:54:16 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Michal Hocko <mhocko@...nel.org>
Cc: Jiri Kosina <jikos@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Linux API <linux-api@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Greg KH <gregkh@...uxfoundation.org>,
Jann Horn <jannh@...gle.com>,
Dominique Martinet <asmadeus@...ewreck.org>,
Andy Lutomirski <luto@...capital.net>,
Dave Chinner <david@...morbit.com>,
Kevin Easton <kevin@...rana.org>,
Matthew Wilcox <willy@...radead.org>,
Cyril Hrubis <chrubis@...e.cz>, Tejun Heo <tj@...nel.org>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Daniel Gruss <daniel@...ss.cc>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is
set for the I/O
On Thu, Jan 31, 2019 at 2:23 AM Michal Hocko <mhocko@...nel.org> wrote:
>
> OK, I guess my question was not precise. What does prevent taking fs
> locks down the path?
IOCB_NOWAIT has never meant that, and will never mean it.
We will never give user space those kinds of guarantees. We do locking
for various reasons. For example, we'll do the mm lock just when
fetching/storing data from/to user space if there's a page fault. Or -
more obviously - we'll also check for - and sleep on - mandatory locks
in rw_verify_area().
There is nothing like "atomic IO" to user space. We simply do not give
those kinds of guarantees. That's even more true when this is a
information leak that we shouldn't expose to user space in the first
place.
Linus
Powered by blists - more mailing lists