Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3306990imm; Fri, 20 Jul 2018 14:06:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd0Z71O6QhdfVZtpQJaG/3NT4Qrp79G595Yr+Q8BbtPgKYAHiG1MHA74+qJvbEeKniOi2Js X-Received: by 2002:a17:902:9345:: with SMTP id g5-v6mr3538751plp.10.1532120804463; Fri, 20 Jul 2018 14:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532120804; cv=none; d=google.com; s=arc-20160816; b=Pt+tsn8MTTAasNEMxQOGJA8rsxE+12eSu5GJliPQmTDjaabEaLGSCFJXq4O4li2q8k 8MdFPrpmEHjfxPfAtbmtGzjaxrLQLC/lMiHah4huxpgVIKHQZqmNTpZSu9/g0Tv0tOBm hYju1TetAqq5Vy8iL+GkGfPIRZumlXux2DYhJFlq51N2Kcq2RwVDaBlVc/EVk1HxkxIl 8yS5MV/8zVLJcuygH8QTWK9cuNHzEWIFgD3FyLEmOmZ+abv2Tz8bqVK1mTbXA0zMSjb/ 7tIQc+PwaMKrsO+2LovbCW7iG1uQ/I8uR/uTXsQDv/6ZdhuzcXPstoT9CRMXe/G6AbAE i8HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=WscAVpu58+ou8ZOorAhxC0hNnnYoLr5A61YjmVp/rkk=; b=GNguVKN6CBCw5UQ8XG7TQwxuN3OPKIZPTib7usr+rliSSLxtAPjhYgu5Jd/+aAs0Mp P3UO4uvyuXoerX7ZCRVDuqxGV9JcT2nGU3xAxh0EQaXVHyH/ewTqkyjOcpue3fKgR/lf HuifRcVMmSreqF4p6dVq9v984nlNRgo8yKTxA7d6VxHIk2BUVrcTDLrUjECSqLlaSCJD I24BgRAF5E5EATulCwR8IUH+I2BRD6ull6vfXnDxyfDwOkzmmqy777sPDkwJ4sZWU7n0 h6KplsBhjafc18m8+Xl48G+nj74HFG72ntVFg/JunE/X8pvHfLVPCKcm6mSyTYbOIyvK 0g1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vMzrjkWn; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si2649933pgh.451.2018.07.20.14.06.29; Fri, 20 Jul 2018 14:06:44 -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=@google.com header.s=20161025 header.b=vMzrjkWn; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbeGTVzy (ORCPT + 99 others); Fri, 20 Jul 2018 17:55:54 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40892 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728064AbeGTVzy (ORCPT ); Fri, 20 Jul 2018 17:55:54 -0400 Received: by mail-pg1-f194.google.com with SMTP id x5-v6so7808036pgp.7 for ; Fri, 20 Jul 2018 14:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=WscAVpu58+ou8ZOorAhxC0hNnnYoLr5A61YjmVp/rkk=; b=vMzrjkWnC5N7KrNSvMWGl47F8yyDyTFRu9iYBbCsNrB1KbdJMfj9GwA8zxodiM8tQq 6JomXilJP8QxLHaUh5Sv5PHgTcbtS9uOka4yegW53tje/SR1OxATRjR1kcYVloEjqR98 42hEj0UYVhjbog44Z5oz2ohBh9sw3kCoxIJUYQhJv7fhT8LImko2ye9ExK+lB+X0P7XN RvJhkWoLvb05B1hpQkb8GZFzKpBo6p9Q3mBDs4yMalVsTknYH6isdpEYcGGRuWKH6heG hwTJDKsR7VeiP9sAGSYmIoawv2nfjSkG31RjyvpQNTyS6YXDDRewg5INV2EAvXsUcZbE E7bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=WscAVpu58+ou8ZOorAhxC0hNnnYoLr5A61YjmVp/rkk=; b=fEfzM4ZD6mlnLwhM8ziL87pWnngyrPrU7x7tj+c06/kSyKjoWDrSpj7ipeuIfuPEzW HllHUR+/Va44Vp2oPTG/Rpj0cQKFyZ2r+qY0HStnL3PBUR/olzqClUebJ3XLKM6s3jh4 +hWhC+uS+kAzdtMY4FFf3v2g4KR6idNChLFg92gbNurAWyna0jBagle8SUjbuCZtv29Q cp2h1nf7kddcJqdXsikhglzaAUFqjcRFjMNd2n5mfdTtee6KegW7pbZmTUtGcjiN+VUc 2Zc5hNtgAsMTNnes7XZiNxUW7dJ/htB9QI0PxjDem9uEqWsCjpIdpC+EpOewpUKsWxso QhIg== X-Gm-Message-State: AOUpUlGPQhDf5yMpDvrqSdy+Nmselm9ugXtjIng4iL8IbdvcDCmXiHVg 6qW7TgFNrg/Rh51a80upsTg2uQ== X-Received: by 2002:a62:fc5:: with SMTP id 66-v6mr3660161pfp.237.1532120753307; Fri, 20 Jul 2018 14:05:53 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id m26-v6sm4046089pfg.61.2018.07.20.14.05.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jul 2018 14:05:52 -0700 (PDT) Date: Fri, 20 Jul 2018 14:05:52 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Yang Shi cc: Andrew Morton , kirill@shutemov.name, hughd@google.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: thp: remove use_zero_page sysfs knob In-Reply-To: <3238b5d2-fd89-a6be-0382-027a24a4d3ad@linux.alibaba.com> Message-ID: 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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. It likely should also be per node.