Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7449404imu; Thu, 31 Jan 2019 10:15:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN4/up8A9B/jP/6wYyHW0bTCy2PIl87PPyUCvD5G0Y8HPPywNzyVSmxG/Q+QWKK3un9ce1DZ X-Received: by 2002:a17:902:50e:: with SMTP id 14mr35456427plf.141.1548958543039; Thu, 31 Jan 2019 10:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548958543; cv=none; d=google.com; s=arc-20160816; b=DHDWiH3xerg4q4DeMY0R8+5Crwndei+wMQlq2CnE1qS0F5mY740qTfuKyrkjBia14q U2ysIYbGXXCFIa9jeokFpeuJfs1pwj8Cfi7Rb1RmD0WulJtYIdDJo5aKob/piUeAmS+P 8LAiDRT4kZolmbGZ4+ZTCgVL0ghl4XZNmHfJX2+UX3nn7ucouWR61hPQQ2WznFU3jH93 P6wZaXcRoO3msKBI3ZGLlK/S74S8ynVM8KLSLGFLm5HR641t79hbu4hIfxHsJ6VuY86y L0QjaF9q9/cV/qBREXxVicpMm0o3Br9IjcjT4u/xeFRUo7SRpry9CEi2MwpnoIcP2Ktb 3xNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+/WNqBHx6t0a72y8JdVi8XzoM/zCOUk1EICcdBncvRA=; b=fgm1PC55SDK5/KcIJfAZVTyV2j1hE18TxHqzKiCTNJq3iOk+zhs2TmSs+I5Co50zAw qXp6FNC8gdNNSTaeUuhkQ4+wxSl4K5tqpsUu6sTT3mNryLVAqjSjr4mpGES23Wl9yDbI wANTIdsbqhbP964FdzpxVofPsfcE9Vk5dwZuBhfZQzbGlKIvvqizgFzgbEaBktdjO+2U 08KrPxzCT5Y45g6/FYd2PlBkS9WZRjbNONIHVCgRAklCGryalksJIN0ZuLKHOkgWP6Yz vSqA6pcUWCR2p7oaiWLHuAcFpcyj6KnWdIHxdZUPK94Z66Xxo1G2mO5dBBkTHE1rhNoO yQlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cfYVpzfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si5059541pfj.139.2019.01.31.10.15.25; Thu, 31 Jan 2019 10:15:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cfYVpzfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727147AbfAaRyh (ORCPT + 99 others); Thu, 31 Jan 2019 12:54:37 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42225 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbfAaRyg (ORCPT ); Thu, 31 Jan 2019 12:54:36 -0500 Received: by mail-lf1-f66.google.com with SMTP id l10so2986546lfh.9 for ; Thu, 31 Jan 2019 09:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+/WNqBHx6t0a72y8JdVi8XzoM/zCOUk1EICcdBncvRA=; b=cfYVpzfF0BxeHbpmKTdtGzAEB++lXqSbRRBs/Mg7UrvWqhXLJQH+FkTiYQe0w2vdL6 h+bs4UA2X9lTfD/JhRPt4W6/luECWOyqyTerzsu6KhEAfexcIeF33M8b5v6vrPX0DkBd ZOf//JDvJCzdvZkr/rTXN7MxegBSBgRnzMxFk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+/WNqBHx6t0a72y8JdVi8XzoM/zCOUk1EICcdBncvRA=; b=ObK4QqNsRcEJs5zc20EhuiXB/SWiDYrIPKIlmViE8+mLZAB7+k0VlNsO3pqIp/BnJw dP8ZgDZW6q2cvd0Vnj/Ar61iR6UXb8JIe+F0k+RmQmU+6k88Ki3DVrMotJIapicrjOlY m2DWHVozO2KIZIaNpAPrtf+fOgxBEapVoL5YYfjYXMNOorEO+YAiAPN5CtRDepddpSt8 K8O3xVKKTbdRzDNNqswu4Z2CqFqc9LfaDCVJLe941z/ImvP77wHkY8uVbd/ujD8a3GQc 1vjFPx9tfxqMWKHWWdQMiQxOp6xYtakTXgAlO1DPshO5K+/RJuDZncga4bIJhR6oX5yn /BOQ== X-Gm-Message-State: AHQUAuZzJLVJnUq1xPNNyidkyJN5qE32S988JhXsPFDxndhcSWVDMxvH 70U04qsii/ujX5KLEOpszrgg3Au3Vj4= X-Received: by 2002:ac2:5551:: with SMTP id l17mr2335018lfk.24.1548957274192; Thu, 31 Jan 2019 09:54:34 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id w9sm955486lfc.66.2019.01.31.09.54.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 09:54:33 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id a8so3016171lfk.5 for ; Thu, 31 Jan 2019 09:54:32 -0800 (PST) X-Received: by 2002:a19:ef15:: with SMTP id n21mr28224071lfh.21.1548957272169; Thu, 31 Jan 2019 09:54:32 -0800 (PST) MIME-Version: 1.0 References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-3-vbabka@suse.cz> <20190131095644.GR18811@dhcp22.suse.cz> <20190131102348.GT18811@dhcp22.suse.cz> In-Reply-To: <20190131102348.GT18811@dhcp22.suse.cz> From: Linus Torvalds Date: Thu, 31 Jan 2019 09:54:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] mm/filemap: initiate readahead even if IOCB_NOWAIT is set for the I/O To: Michal Hocko Cc: Jiri Kosina , Vlastimil Babka , Andrew Morton , Linux List Kernel Mailing , Linux-MM , Linux API , Peter Zijlstra , Greg KH , Jann Horn , Dominique Martinet , Andy Lutomirski , Dave Chinner , Kevin Easton , Matthew Wilcox , Cyril Hrubis , Tejun Heo , "Kirill A . Shutemov" , Daniel Gruss , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 31, 2019 at 2:23 AM Michal Hocko 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