From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 280FCC10DCE for ; Thu, 12 Mar 2020 18:38:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F24D32067C for ; Thu, 12 Mar 2020 18:38:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F24D32067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 832616B0006; Thu, 12 Mar 2020 14:38:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E24D6B0007; Thu, 12 Mar 2020 14:38:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AA906B0008; Thu, 12 Mar 2020 14:38:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by kanga.kvack.org (Postfix) with ESMTP id 4FF1A6B0006 for ; Thu, 12 Mar 2020 14:38:28 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 16F0DB2BD for ; Thu, 12 Mar 2020 18:38:28 +0000 (UTC) X-FDA: 76587570696.13.sense29_2cb9506b44601 X-HE-Tag: sense29_2cb9506b44601 X-Filterd-Recvd-Size: 2620 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Mar 2020 18:38:27 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 11:38:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,545,1574150400"; d="scan'208";a="236715869" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga008.fm.intel.com with ESMTP; 12 Mar 2020 11:38:24 -0700 Date: Thu, 12 Mar 2020 11:38:24 -0700 From: Sean Christopherson To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, linux-mm@kvack.org, Ismo Puustinen , Mark Shanahan , Mikko Ylinen , Derek Bombien Subject: Re: [PATCH v28 16/22] x86/sgx: Add a page reclaimer Message-ID: <20200312183824.GB26453@linux.intel.com> References: <20200303233609.713348-1-jarkko.sakkinen@linux.intel.com> <20200303233609.713348-17-jarkko.sakkinen@linux.intel.com> <20200305190354.GK11500@linux.intel.com> <20200306184702.GD7472@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200306184702.GD7472@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Mar 06, 2020 at 08:47:02PM +0200, Jarkko Sakkinen wrote: > On Thu, Mar 05, 2020 at 11:03:54AM -0800, Sean Christopherson wrote: > > We've also discussed taking a file descriptor to hold the backing, but > > unless I'm misreading the pagecache code, that doesn't solve the incorrect > > accounting problem because the current task, i.e. evicting task, would be > > charged. In other words, whether the backing is kernel or user controlled > > is purely an ABI question. > > Even if the file is owned by a different process the account happens > to "current"? Yes. Which makes sense as files do not have a 1:1 association with tasks.