Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp131474ybi; Fri, 24 May 2019 01:09:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWL+ljTmqTt05EoQyQs9yjI1Fv7PhaVblsiIgwauaE4R+OUk5oLCj8Ha1fRRt9gokOmrVb X-Received: by 2002:aa7:90ce:: with SMTP id k14mr27827723pfk.239.1558685373723; Fri, 24 May 2019 01:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558685373; cv=none; d=google.com; s=arc-20160816; b=Z2BGz4L+pEhez2MxwXqYEtGGg6IV9pW3+6QO0pvDKzGq3qHXqt75fRJWNF2it0Dnmm bUzLsyvbmCtf6DBwKbQzk0zAteBgHlM+IMPs1SokFAQyaK2IiX+DzCfbwWQuTe1HivUp 6HuRuVJy/IuEHKYb3+2eNFF6X+0a3ptEV6Ffdbku2vLYtrMCmJoRJEkotF+1Nezzhhza c5uR9VapybyEhcJcckmip9G2+USBuQ18J3wppT52L+1Kq3wveH/4s/NvU5WycSp6NGaJ Uwn6TxFCDQJOAbMUv5EQNZxPstwInJM5CLLEMVAlDZcn0vNNIEVL1jZdtuzM76q1QGYM /1yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=3IA1BAi9eimDGQCfJtfUGB7E4u11v01pte5YUVPS/hc=; b=r/iWmdk8Mm08OyHtZU4M6Z1B6Ykd+MfzDBCQi8Tqelo9sIcDzBxl1y9wA0lKQGbMXQ tRCSXijfY6ZhW/0WYU7B/BAk4cjombiN143j3VQXczGGdYl+zztqNJfjWabfPsSUrkEx fRQbxaknmLABNIErwCAMMHB4U740rhieC0rvUTE4CFrZLNt3ISSzr4Jcv55b6F9U8lnQ tznn84yZqF7uk6qWwpx3tnl2Nu5l3/sV/wjJisL6ovKRmsXlN0ldti0zJmcMmag0jGDu xiT/xqnPyz1nwRUYeE1jT7UDQaf7WJfZ43dkkxDB5Exovpa2jsF3Y/lvdVHx4dB8KjUg RwMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=o0Dk7f3+; dkim=pass header.i=@codeaurora.org header.s=default header.b="kE4NYJ/h"; 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 s80si2851650pgs.468.2019.05.24.01.09.11; Fri, 24 May 2019 01:09:33 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=o0Dk7f3+; dkim=pass header.i=@codeaurora.org header.s=default header.b="kE4NYJ/h"; 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 S2389424AbfEXIGj (ORCPT + 99 others); Fri, 24 May 2019 04:06:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45050 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389046AbfEXIGi (ORCPT ); Fri, 24 May 2019 04:06:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BC43F60E40; Fri, 24 May 2019 08:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558685196; bh=HFahEd1e9otwuYSiHy1qPYvBNA3cY2td10pq593gtdw=; h=From:To:Cc:Subject:Date:From; b=o0Dk7f3+hdz7aLAyaH+W2bwHvC2BB+Qo7wch7/PP9JDnDkcfeQL3QIBvBweFT/5Hw XS8fzRC1wLadBfl4wxjqJ5IZEcUs6TlNd1ZqDXwBc6gawFGgTgvx6XRoSSGAyTR9fy Sa6xsgNpqk6Jyk005JTE9Rkg7+Prbf5tR/gJmIIM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3FC7C60716; Fri, 24 May 2019 08:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558685195; bh=HFahEd1e9otwuYSiHy1qPYvBNA3cY2td10pq593gtdw=; h=From:To:Cc:Subject:Date:From; b=kE4NYJ/hbdpoJMFmQboUNCozSkfLhIstHc2jckprU6iCfY++FGxUi0PuBJuCb2yGb 72EfNaAjfosSNFJm6llDdqSxPceH2w1ay4QaS73iKcXMWqbjCRmejXDuPzVug4udpX gB9LczQo46sRD5H9Llx+DAkvtItJUD1AnpKIzayM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3FC7C60716 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org From: Sahitya Tummala To: Andrew Morton , Kirill Tkhai , Michal Hocko , Johannes Weiner , Vladimir Davydov , Yafang Shao , Roman Gushchin , Mel Gorman , linux-mm@kvack.org, "Theodore Y. Ts'o" , Jaegeuk Kim , Eric Biggers , linux-fscrypt@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Sahitya Tummala Subject: [PATCH] mm/vmscan.c: drop all inode/dentry cache from LRU Date: Fri, 24 May 2019 13:36:01 +0530 Message-Id: <1558685161-860-1-git-send-email-stummala@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index d96c547..b48926f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -730,7 +730,7 @@ void drop_slab_node(int nid) do { freed += shrink_slab(GFP_KERNEL, nid, memcg, 0); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)) != NULL); - } while (freed > 10); + } while (freed != 0); } void drop_slab(void) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.