Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6923241imu; Thu, 31 Jan 2019 01:52:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN53T8KQNLPPflOGm68JH5s5Q1kaLKLAGZxPG//RbVA+AbJ7Hqt7qQRFr4F2cKOCU9sVfN1I X-Received: by 2002:a63:6cc:: with SMTP id 195mr30990176pgg.401.1548928327640; Thu, 31 Jan 2019 01:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548928327; cv=none; d=google.com; s=arc-20160816; b=t4w6v1CHTq5RMkBhVWJIq1ZnoD5wn21m1ZDaero1CJOvf8ZYJuAaO0xRxAlDN9H1gK JDlnMgFu1vpA5dvLZjtPwW7zDMQ8c0Nao/uyjoclZTeU3jemHf3VnJ+yX8MXFDuNmvmo UCAOLcNRyhPjNbmALwH16sFa54hcUzK4x5tc+ypVe4QhGi3qhJ3B5sbr310nSQjrBGoZ W4L1XoGiCgvf04ztReFSYVlo+DEMC1fbBdlWF/1O7+dSYAeY7v7VfBAw3+tSETQDOU8o 7K+rBksSMw5XNjcVRS9hj0/o6JtEayqV7IptynjEepaH6BQJSR7F+Lr8iwZuJDHrWeLI Bmwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nfV7OIObBXz32fdW+x2GE9V6v0HxaBHPSEgwCSNk0WM=; b=WyVzIig1UR8OWn4x3wQ3viJFvJZPdn/Gb4J4fisiO49o5faBbFucBlgDb3LeerFkQL TI13cjVYuJ+QCtLJ/GuZbEPZerQSRiezIxAfHu8KwcVt5Y8oxHIiRXVurncBDjBWk9yq IqSTuhbb51HS2Kytx4yLwXP1/rb3rMZ00gKBIkv6HbWyRNEpd7vdcBLMZqByAcL3FTy/ RlONF+ffE9XCRSftpPCj0Y2w7T2GT/+x03LrRHqVQfnZN1nsJkoChDeg/642kRxJZU9A d7ePIQ0CYqrkjXBJso8EUyhhC2khiklwuL9N4HMoueASl/agyaju/ojbSRtHs4L6JaG2 Fbww== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si4172449pld.353.2019.01.31.01.51.52; Thu, 31 Jan 2019 01:52:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731771AbfAaJvj (ORCPT + 99 others); Thu, 31 Jan 2019 04:51:39 -0500 Received: from nautica.notk.org ([91.121.71.147]:52183 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726316AbfAaJvj (ORCPT ); Thu, 31 Jan 2019 04:51:39 -0500 Received: by nautica.notk.org (Postfix, from userid 1001) id DAA5DC009; Thu, 31 Jan 2019 10:51:36 +0100 (CET) Date: Thu, 31 Jan 2019 10:51:21 +0100 From: Dominique Martinet To: Michal Hocko , Josh Snyder Cc: Vlastimil Babka , Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Peter Zijlstra , Greg KH , Jann Horn , Jiri Kosina , Andy Lutomirski , Dave Chinner , Kevin Easton , Matthew Wilcox , Cyril Hrubis , Tejun Heo , "Kirill A . Shutemov" , Daniel Gruss , Jiri Kosina Subject: Re: [PATCH 1/3] mm/mincore: make mincore() more conservative Message-ID: <20190131095121.GA26131@nautica> References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-2-vbabka@suse.cz> <20190131094357.GQ18811@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190131094357.GQ18811@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko wrote on Thu, Jan 31, 2019: > > Change the semantics of mincore() so that it only reveals pagecache information > > for non-anonymous mappings that belog to files that the calling process could > > (if it tried to) successfully open for writing. > > I agree that this is a better way than the original 574823bfab82 > ("Change mincore() to count "mapped" pages rather than "cached" pages"). > One thing is still not clear to me though. Is the new owner/writeable > check OK for the Netflix-like usecases? I mean does happycache have > appropriate access to the cache data? I have tried to re-read the > original thread but couldn't find any confirmation. It's enough for my use cases and Josh didn't seem to oppose, but since he's not in Cc I don't think he would answer -- added him now :) FWIW happycache writes in the current directory by default so I assume in the way they use it it would usually have access one way or another. > If this still doesn't help happycache kind of workloads then we should > add a capability check IMO but this looks like a decent foundation to > me. the inode_owner_or_capable/inode_permission helpers already do allow quite a few capabilities there -- Dominique