Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1294686imu; Wed, 16 Jan 2019 16:36:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN4yNW34QyuDWPrD5Do6fo1mscYOJp4FIFXlL5uIvIMASilXVjwb3i5PR2SJoEkxxOZxyGz2 X-Received: by 2002:a17:902:6bc9:: with SMTP id m9mr12628542plt.173.1547685370746; Wed, 16 Jan 2019 16:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547685370; cv=none; d=google.com; s=arc-20160816; b=uxVqA/4Gfuct9O0aIAOVZzBP3s8WL0BFrBqXpX1Mdu8hBAcIh9UsbXuI7TAVqepOyB k+7rxmG/JCEoyUuglbxINhsZqXB+j2liIo/Fcx1Ci2byWbaoiYzqGDjV9ctVDJNjqvrj uia2zQEZ9YENAi3Yej6aTM8rXnAgHGFObS+S/BhmI6Zr5bBEh678OKwwphOHot5DHuaU 11RbzyVC2gc5YQHw3+VXA2nNUbZB09O4t1JV45qwn5oQ4Eoo5Bko2FWBKAIqxZOFymmV xY/hSKkemfTLA2N4hXCcp7mICeSw11pdYVwAA3B32jfuSl92L4ikVPSPPBqablkrKOPc dpSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=v+ipKpMo6M8q2+RSB2xA7fA9fwIbuwTu9IiAK056aPo=; b=tW3+y8T2eVRRXAuX72i9UyzfP2VQjgMKQ8ZZZwYAfa1zeVknJD4H/QjjziLig1lbZK 33FBSj7wEJv1lKos8tfQZd5XMOFbAvgChe94s1eSLMfylmdMMxg57ASJ2vFHDuCCjFYb dD0bS6ir3A8YZvGmouADOzJmgP3sqp+QinXjbJKFuoLGAC0o1VA0sULjOly6aWE8Wdcw um12611/qLnO/L7ZxEwsYd0vcZjvW8BaRAgEXVhPSFwduAZrVA2vscV2shzN4lsGEPA/ 229167ryREJhCd4C2S9XjPmyR8CyjdiTz+A1WKR4BSFDiNxdO7uZvFqBl1ykMSkVrGOF r/CQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si2056011pgk.323.2019.01.16.16.35.55; Wed, 16 Jan 2019 16:36:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732597AbfAPUXI (ORCPT + 99 others); Wed, 16 Jan 2019 15:23:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:38546 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727511AbfAPUXI (ORCPT ); Wed, 16 Jan 2019 15:23:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AC756ADD7; Wed, 16 Jan 2019 20:23:05 +0000 (UTC) Date: Wed, 16 Jan 2019 21:23:04 +0100 (CET) From: Jiri Kosina To: Linus Torvalds cc: Dominique Martinet , Andy Lutomirski , Josh Snyder , Dave Chinner , Matthew Wilcox , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged In-Reply-To: Message-ID: References: <20190110004424.GH27534@dastard> <20190110070355.GJ27534@dastard> <20190110122442.GA21216@nautica> <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> <20190116054613.GA11670@nautica> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1678380546-457690195-1547670185=:6626" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1678380546-457690195-1547670185=:6626 Content-Type: text/plain; charset=US-ASCII On Thu, 17 Jan 2019, Linus Torvalds wrote: > > So that seems to deal with mincore() in a reasonable way indeed. > > > > It doesn't unfortunately really solve the preadv2(RWF_NOWAIT), nor does it > > provide any good answer what to do about it, does it? > > As I suggested earlier in the thread, the fix for RWF_NOWAIT might be > to just move the test down to after readahead. So I've done some basic smoke testing (~2 hours of LTP+xfstests) on the kernel with the three topmost patches from https://git.kernel.org/pub/scm/linux/kernel/git/jikos/jikos.git/log/?h=pagecache-sidechannel applied (also attaching to this mail), and no obvious breakage popped up. So if noone sees any principal problem there, I'll happily submit it with proper attribution etc. Thanks, -- Jiri Kosina SUSE Labs --1678380546-457690195-1547670185=:6626 Content-Type: text/x-patch; name=0001-Revert-Change-mincore-to-count-mapped-pages-rather-t.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0001-Revert-Change-mincore-to-count-mapped-pages-rather-t.patch RnJvbSBjYmY5MzgxZWVkNjc2NmNmZjViMDVmOWQ5NDhjMWQyMjVjYjNkNzhi IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogSmlyaSBLb3NpbmEg PGprb3NpbmFAc3VzZS5jej4NCkRhdGU6IFdlZCwgMTYgSmFuIDIwMTkgMjA6 NTE6MzEgKzAxMDANClN1YmplY3Q6IFtQQVRD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DEpOw0KKwkJCQkq dmVjID0gMTsNCisjZW5kaWYNCisJCQl9DQogCQl9DQogCQl2ZWMrKzsNCiAJ fQ0KLS0gDQoyLjEyLjMNCg0K --1678380546-457690195-1547670185=:6626 Content-Type: text/x-patch; name=0002-mm-mincore-make-mincore-more-conservative.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0002-mm-mincore-make-mincore-more-conservative.patch RnJvbSBjYTAyYTAyNmY0MGRmYWViYzI5YzI5ZWRkOWM5OTJhMGZmMTAwNzVl IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogSmlyaSBLb3NpbmEg PGprb3NpbmFAc3VzZS5jej4NCkRhdGU6IFdlZCwgMTYgSmFuIDIwMTkgMjA6 NTM6MTcgKzAxMDANClN1YmplY3Q6IFtQQVRDSCAyLzNdIG1tL21pbmNvcmU6 IG1ha2UgbWluY29yZSgpIG1vcmUgY29uc2VydmF0aXZlDQoNClRoZSBzZW1h bnRpY3Mgb2Ygd2hhdCBtaW5jb3JlKCkgY29uc2lkZXJzIHRvIGJlIHJlc2lk ZW50IGlzIG5vdCBjb21wbGV0ZWx5DQpjbGVhcmFyLCBidXQgTGludXggaGFz IGFsd2F5cyAoc2luY2UgMi4zLjUyLCB3aGljaCBpcyB3aGVuIG1pbmNvcmUo KSB3YXMNCmluaXRpYWxseSBkb25lKSB0cmVhdGVkIGl0IGFzICJwYWdlIGlz IGF2YWlsYWJsZSBpbiBwYWdlIGNhY2hlIi4NCg0KVGhhdCdzIHBvdGVudGlh bGx5IGEgcHJvYmxlbSwgYXMgdGhhdCBbaW5dZGlyZWN0bHkgZXhwb3NlcyBt ZXRhLWluZm9ybWF0aW9uDQphYm91dCBwYWdlY2FjaGUgLyBtZW1vcnkgbWFw cGluZyBzdGF0ZSBldmVuIGFib3V0IG1lbW9yeSBub3Qgc3RyaWN0bHkgYmVs b25naW5nDQp0byB0aGUgcHJvY2VzcyBleGVjdXRpbmcgdG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GtfcGFnZV9yYW5nZShhZGRyLCBlbmQs ICZtaW5jb3JlX3dhbGspOw0KIAlpZiAoZXJyIDwgMCkNCiAJCXJldHVybiBl cnI7DQotLSANCjIuMTIuMw0KDQo= --1678380546-457690195-1547670185=:6626 Content-Type: text/x-patch; name=0003-mm-filemap-initiate-readahead-even-if-IOCB_NOWAIT-is.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0003-mm-filemap-initiate-readahead-even-if-IOCB_NOWAIT-is.patch RnJvbSBlNzc2NWYzMTdhZmIxOTNhZGI0YmEwMGQ4MTI1MTY4NjE5MWNiZjRi IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogSmlyaSBLb3NpbmEg PGprb3NpbmFAc3VzZS5jej4NCkRhdGU6IFdlZCwgMTYgSmFuIDIwMTkgMjE6 MDY6NTggKzAxMDANClN1YmplY3Q6IFtQQVRDSCAzLzNdIG1tL2ZpbGVtYXA6 IGluaXRpYXRlIHJlYWRhaGVhZCBldmVuIGlmIElPQ0JfTk9XQUlUIGlzIHNl dA0KIGZvciB0aGUgSS9PDQoNCnByZWFkdjIoUldGX05PV0FJVCkgY2FuIGJl IHVzZWQgdG8gb3BlbiBhIHNpZGUtY2hhbm5lbCB0byBwYWdlY2FjaGUgY29u dGVudHMsIGFzDQppdCByZXZlYWxzIG1ldGFkYXRhIGFib3V0IHJlc2lkZW5j eSBvZiBwYWdlcyBpbiBwYWdlY2FjaGUuDQoNCklmIHByZWFkdjIoUldGX05P V0FJVCkgcmV0dXJucyBpbW1lZGlhdGVseSwgaXQgcHJvdmlkZXMgYSBjbGVh ciAicGFnZSBub3QNCnJlc2lkZW50IiBpbmZvcm1hdGlvbiwgYW5kIHZpY2Ug dmVyc2EuDQoNCkNsb3NlIHRoYXQgc2lkZWNoYW5uZWwgYnkgYWx3YXlzIGlu aXRpYXRpbmcgcmVhZGFoZWFkIG9uIHRoZSBjYWNoZSBpZiB3ZQ0KZW5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