Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3419299imm; Fri, 20 Jul 2018 16:51:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcHkAvA0FwD8CU+Iw1poDBV5PxEI1jH15oI/NaA3mim+6C1p3YZd/7w1zhe1revLEzFhZg6 X-Received: by 2002:a62:3a9d:: with SMTP id v29-v6mr4065567pfj.215.1532130659968; Fri, 20 Jul 2018 16:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532130659; cv=none; d=google.com; s=arc-20160816; b=By5X448SiVeE6GhBLOubcNPngoC6hUybHk/ze7hgfZMDytugA7eCaR3WQAhG5hEhSy TY5O2o1bQD15C4M2YNA5p9/PjugqAsCDRDXPFEeCCmibRp6wf3IndI8bgP/sdLy9zO4C iiJNiMiA7D3LKaJcCZ4AVkr3Gi37CEe2xAfYwDyCa//Rgbh/uRHCM7p6RmHt1p5rNzLc Pph+4J/tjhPHsf/ipIO+R5KkkSMwYfHXYoJg+g8xkL0qsqlZ2JQo1IcE68fe5ITHGAh7 t8tefshy7WggZxOTFwqjVaACYEOvBjrpwxCpCrsmHXfy6PTjhqaalGzGlk/ZXo9p/kx6 zCCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=iLaEhmPQFOqWCLwxJKGYGiqxJyUDokChRi+xWq4Aim0=; b=uAKaGFLfEfC9+LTMQUDJ8d8QYOo8eohdApz0lPaOeegvVDtWXg1uBnkpRh4zRlEzry u1up1QxZnN2qfQ30JQnktcQ+HOuNZ5O4j8mQo20N3Q1Ac9qPnvF53guJ1RnnoIsgIrAp 1P3aLvCb5rq+SI2J8RW28M1TzvklVUDqBl4xiWHT5k3EKvWy1j5J1aRgIGUy0dEnlaIx S16MappGXCc09/Acb+yOTHvFZyBpa+hEDVb1xFAl/e4EG+rBoF0WVSZxqv+cEgqwg7WN 26wGVf9cSB8meoMUe/4occZIMj3cWg3AbCPa4dzQYu0MfE44de+e+HbexzSHK+PiH6Xf wShQ== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si2849852pfu.143.2018.07.20.16.50.43; Fri, 20 Jul 2018 16:50:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728183AbeGUAkW (ORCPT + 99 others); Fri, 20 Jul 2018 20:40:22 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:48494 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727845AbeGUAkV (ORCPT ); Fri, 20 Jul 2018 20:40:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07487;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0T50SZ8a_1532130571; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0T50SZ8a_1532130571) by smtp.aliyun-inc.com(127.0.0.1); Sat, 21 Jul 2018 07:49:33 +0800 Subject: Re: [PATCH] mm: thp: remove use_zero_page sysfs knob To: David Rientjes Cc: Andrew Morton , kirill@shutemov.name, hughd@google.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1532110430-115278-1-git-send-email-yang.shi@linux.alibaba.com> <20180720123243.6dfc95ba061cd06e05c0262e@linux-foundation.org> <3238b5d2-fd89-a6be-0382-027a24a4d3ad@linux.alibaba.com> From: Yang Shi Message-ID: Date: Fri, 20 Jul 2018 16:49:30 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/20/18 2:05 PM, David Rientjes wrote: > On Fri, 20 Jul 2018, Yang Shi wrote: > >>> We disable the huge zero page through this interface, there were issues >>> related to the huge zero page shrinker (probably best to never free a >>> per-node huge zero page after allocated) and CVE-2017-1000405 for huge >>> dirty COW. >> Thanks for the information. It looks the CVE has been resolved by commit >> a8f97366452ed491d13cf1e44241bc0b5740b1f0 ("mm, thp: Do not make page table >> dirty unconditionally in touch_p[mu]d()"), which is in 4.15 already. >> > For users who run kernels earlier than 4.15 they may choose to mitigate > the CVE by using this tunable. It's not something we permanently need to > have, but it may likely be too early. Yes, it might be good to keep it around for a while. > >> What was the shrinker related issue? I'm supposed it has been resolved, right? >> > The huge zero page can be reclaimed under memory pressure and, if it is, > it is attempted to be allocted again with gfp flags that attempt memory > compaction that can become expensive. If we are constantly under memory > pressure, it gets freed and reallocated millions of times always trying to > compact memory both directly and by kicking kcompactd in the background. Even though we don't use huge zero page, we may also run into the similar issue under memory pressure. Just save the cost of calling huge zero page shrinker, but actually its cost sound not high. > > It likely should also be per node.