Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp692060ybi; Fri, 24 May 2019 09:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEgwhS617ec19RSVV526eBBp7Cxl/zrAZsA8PBuFhjfEPbvGnoRSXBH+Rmv0MR1XHyR1pN X-Received: by 2002:a17:90a:a0a:: with SMTP id o10mr10479602pjo.105.1558716842066; Fri, 24 May 2019 09:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558716842; cv=none; d=google.com; s=arc-20160816; b=KQstdROjeO9a5LPvv7YRUBAWu+YfUsvFavu6t6WxbKRaJixyH1IcDQuP1GOV5aMOe7 vDGG03I1hSRTFz48mdu6sq94RemS97RUmXwp0sZY4/FS/59imRH6IXe4IN/GuCu1FqFs Le+9FQJRnrEscdzX1YH1Wse1I5dbU1XlhChfeaKkNeni+wigeSJZGdj74/NZJwEM8viB uZ7pRxpCvMwnM7CrcdZi+1l1IGk7mszTKHAJUL28s0uwMYX6Jz4P9RQYxLy82pn/p5NN ATn5psU6bK6dQWrUBgxAXyrai607WhYJeGmaBhPkMSyi/AIh7pSDFxrYzY5F5cP+7/0j zKBA== 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:mail-followup-to :message-id:subject:cc:to:from:date; bh=00FYUQsTgLdct/PTzOD2ukpt6YbR5pt7UAxi9i6WxxA=; b=x2iQ7X+d0NM4A3dIGwqbfNq6zIa9Mgsfe8pHc5jJGoZrYQxRLlu+byckzzpamjrFZV zUD7FeG1ItWHKXbopiRMfHE6qOGN3ZJ03KZj6pSnbbJmHJyBssQvPt+I46e9WjzFBz5Q lQLsZ4alRgAxpDfB0o5Qg8bMShCpFI0Z0vqrpGLiFqMQLJ3/ZVj3Oz5LWSQfR55Fe5MR xocyFBdvLXtqCrAc2ROSFHP8We63+M9G0XF/lihZ+Ytbo6pKYDEcFtxLs0O9VPXEM2cK h0cDcd1dI89yAB6grnxPSvjMgUpF5eipiR245+dxfo113Z+p5S7Jve1qiVJJZhJgJmZV Vp+w== 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 77si5102636pgb.237.2019.05.24.09.53.46; Fri, 24 May 2019 09:54:02 -0700 (PDT) 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 S2390733AbfEXQwj (ORCPT + 99 others); Fri, 24 May 2019 12:52:39 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:56740 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390210AbfEXQwj (ORCPT ); Fri, 24 May 2019 12:52:39 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-109.corp.google.com [104.133.0.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x4OGqDtZ028397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 May 2019 12:52:16 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 421D9420481; Fri, 24 May 2019 12:52:13 -0400 (EDT) Date: Fri, 24 May 2019 12:52:13 -0400 From: "Theodore Ts'o" To: Sahitya Tummala Cc: Andrew Morton , Kirill Tkhai , Michal Hocko , Johannes Weiner , Vladimir Davydov , Yafang Shao , Roman Gushchin , Mel Gorman , linux-mm@kvack.org, Jaegeuk Kim , Eric Biggers , linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmscan.c: drop all inode/dentry cache from LRU Message-ID: <20190524165213.GB2765@mit.edu> Mail-Followup-To: Theodore Ts'o , Sahitya Tummala , Andrew Morton , Kirill Tkhai , Michal Hocko , Johannes Weiner , Vladimir Davydov , Yafang Shao , Roman Gushchin , Mel Gorman , linux-mm@kvack.org, Jaegeuk Kim , Eric Biggers , linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org References: <1558685161-860-1-git-send-email-stummala@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558685161-860-1-git-send-email-stummala@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 01:36:01PM +0530, Sahitya Tummala wrote: > This is important for the scenario where FBE (file based encryption) > is enabled. With FBE, the encryption context needed to en/decrypt a file > will be stored in inode and any inode that is left in the cache after > drop_caches is done will be a problem. For ex, in Android, drop_caches > will be used when switching work profiles. > > Signed-off-by: Sahitya Tummala Instead of making a change to vmscan.c, it's probably better to migrate to the new fscrypt key-management framework, which solves this problem with an explicit FS_IOC_REMOVE_ENCRYPTION_KEY ioctl. This allows the system to remove all inodes that were made available via a single key without having nuking all other inodes --- this would make it much faster after a user logs out of ChromeOS, for example: See: https://patchwork.kernel.org/patch/10952019/ - Ted