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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 15E7FC352AA for ; Tue, 1 Oct 2019 12:31:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6C4321920 for ; Tue, 1 Oct 2019 12:31:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="nTBOO2eh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6C4321920 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5B45A8E0005; Tue, 1 Oct 2019 08:31:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5658F8E0001; Tue, 1 Oct 2019 08:31:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 454508E0005; Tue, 1 Oct 2019 08:31:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 24FB68E0001 for ; Tue, 1 Oct 2019 08:31:54 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id C7BD855FAA for ; Tue, 1 Oct 2019 12:31:53 +0000 (UTC) X-FDA: 75995152506.28.tiger40_107cadb2c2921 X-HE-Tag: tiger40_107cadb2c2921 X-Filterd-Recvd-Size: 5650 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Oct 2019 12:31:53 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id h33so11702481edh.12 for ; Tue, 01 Oct 2019 05:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=+oZPiXvOUSLu8pkEA5SDtoDi+xBvTxdx9cy3tZSs02c=; b=nTBOO2ehdswnIRiiaQ7rY4WuMupCCDuJZUaa9lgIqlkHHq6rj6LN5WT+neLB3y4ilS odNR6OoL6dhvcBF0a16atyWyRg3Ceeomj11YLqBQ9fEXVNQyGW2o7jlREYG2fygUTM/p TbJpRxd3UDh7wrj4mzpSpkmQmu4WGgqCTPRCMYynH9xZmn/v5PQrpdGz0A27I4USKStW thUynNxVUidvltlv0o9dywQM72PH2f+40HPaKKVstOm6NR5Hmv3VM/WVtlbnyVRKo1oj 07AotumHD5wx816uU5v2DHRq8pjHmueBMIyTURDXd01roAJtUqucW1g2llsZcbT9UnoI 17eA== 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:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=+oZPiXvOUSLu8pkEA5SDtoDi+xBvTxdx9cy3tZSs02c=; b=CNGmMrMEq3uNFu3k8TjnNCyZVeWSeOdgfGgxq8AjpP1rWlIJDSmg9SbSHI+gwhw5bg hVPdXljJiGOR7J9QEiHxHsbJWT2eMSURL8m1racB9COnK7lrDL40zP2L0NLMKRFi5DUO bKd8Gg7lpGoEH6IZGjcGhinIZa2NB2rCBBNbsuoCIwvE7Nri8ovze3t7UbHzOcklrmxK zfdV6xe16AkpSlDmXNc2Rcax/55j/5ubNI4ASkFEi/2Rx04jBwin4812bY5zXL6knDAi 3yExTLJHi0iqE3GdC9+1r6i2jzgm65hH90SSO/vY+CypeyAIkvZZwqZWtUyBGmIsnb54 yKXw== X-Gm-Message-State: APjAAAVFnDTO7LxbUEqhqpJccB8mYEpmg/WvnunVO0r2i/8u3mu9JP3m XWWaCWGlFX8DuzOvw/5eLs+qaelLIXI= X-Google-Smtp-Source: APXvYqypWkwrGVpNNaehcIUoKO0hW2eDDQ90dumJqHMiwm0z5DHfLIqGRB3hKyoRBwr+sf9nN0spzQ== X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr24003067ejb.161.1569933111868; Tue, 01 Oct 2019 05:31:51 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id ot24sm1833844ejb.59.2019.10.01.05.31.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Oct 2019 05:31:51 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id BCA03102FB8; Tue, 1 Oct 2019 15:31:51 +0300 (+03) Date: Tue, 1 Oct 2019 15:31:51 +0300 From: "Kirill A. Shutemov" To: Qian Cai Cc: Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, "Kirill A. Shutemov" , Matthew Wilcox , Mel Gorman , Michal Hocko , Dmitry Vyukov , Walter Wu , Andrey Ryabinin Subject: Re: [PATCH v2 2/3] mm, page_owner: decouple freeing stack trace from debug_pagealloc Message-ID: <20191001123151.qmv4ist3enq65uha@box> References: <731C4866-DF28-4C96-8EEE-5F22359501FE@lca.pw> <218f6fa7-a91e-4630-12ea-52abb6762d55@suse.cz> <20191001115114.gnala74q3ydreuii@box> <1569932788.5576.247.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1569932788.5576.247.camel@lca.pw> User-Agent: NeoMutt/20180716 Content-Transfer-Encoding: quoted-printable 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 Tue, Oct 01, 2019 at 08:26:28AM -0400, Qian Cai wrote: > On Tue, 2019-10-01 at 14:51 +0300, Kirill A. Shutemov wrote: > > On Tue, Oct 01, 2019 at 10:07:44AM +0200, Vlastimil Babka wrote: > > > On 10/1/19 1:49 AM, Qian Cai wrote: > > > >=20 > > > >=20 > > > > > On Sep 30, 2019, at 5:43 PM, Vlastimil Babka w= rote: > > > > >=20 > > > > > Well, my use case is shipping production kernels with CONFIG_PA= GE_OWNER > > > > > and CONFIG_DEBUG_PAGEALLOC enabled, and instructing users to bo= ot-time > > > > > enable only for troubleshooting a crash or memory leak, without= a need > > > > > to install a debug kernel. Things like static keys and page_ext > > > > > allocations makes this possible without CPU and memory overhead= when not > > > > > boot-time enabled. I don't know too much about KASAN internals,= but I > > > > > assume it's not possible to use it that way on production kerne= ls yet? > > > >=20 > > > > In that case, why can=E2=80=99t users just simply enable page_own= er=3Don and > > > > debug_pagealloc=3Don for troubleshooting? The later makes the ker= nel > > > > slower, but I am not sure if it is worth optimization by adding a= new > > > > parameter. There have already been quite a few MM-related kernel > > > > parameters that could tidy up a bit in the future. > > >=20 > > > They can do that and it was intention, yes. The extra parameter was > > > requested by Kirill, so I'll defer the answer to him :) > >=20 > > DEBUG_PAGEALLOC is much more intrusive debug option. Not all architec= tures > > support it in an efficient way. Some require hibernation. > >=20 > > I don't see a reason to tie these two option together. >=20 > Make sense. How about page_owner=3Don will have page_owner_free=3Don by= default? > That way we don't need the extra parameter. It's 0.1% of system memory. Does it matter for a debug option? I don't kn= ow. --=20 Kirill A. Shutemov