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_2 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 5B7F5ECE589 for ; Tue, 1 Oct 2019 12:26:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0F7FA21D81 for ; Tue, 1 Oct 2019 12:26:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="ou1cPBP9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F7FA21D81 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 62ED28E0005; Tue, 1 Oct 2019 08:26:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B7238E0001; Tue, 1 Oct 2019 08:26:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47E718E0005; Tue, 1 Oct 2019 08:26:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0204.hostedemail.com [216.40.44.204]) by kanga.kvack.org (Postfix) with ESMTP id 2075E8E0001 for ; Tue, 1 Oct 2019 08:26:33 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id AFD7E180AD802 for ; Tue, 1 Oct 2019 12:26:32 +0000 (UTC) X-FDA: 75995139024.27.pipe10_73470cb816850 X-HE-Tag: pipe10_73470cb816850 X-Filterd-Recvd-Size: 5165 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Oct 2019 12:26:32 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id q203so10999196qke.1 for ; Tue, 01 Oct 2019 05:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=r9jiZXdMxIIkyZWDEljTg7/li1H7K2+Hf7E7i2HKYGc=; b=ou1cPBP9atvCZ8eFdUXv2lPlMctqRAA+W5PPLgdRZMpza7Ir7nvCVx5jy6W5STmezz ymrIIvsoPwxIBYC2tqVoaOVBWYO5lqzrQP4aRhqfa2yOpUXjlkIY5XsTPnEakhn6GGdm h7Bh7oeJJkzcRV4/zKtRE/BALBRs7t5Se6fBX+5ivuM8mYDf7vC/piminIc7KUH2LuHP G4hNXkYVXJKGGSrdu4H+fh7wYV/Vbt3JYgpzVGuOQp1BuuO2Y/9nX3jAyzE6J5/XmsKQ DP5mehMeXbeibx10PrT5YAfErkQz2GxsCd6P86UCEykSlgyHffM9HupWcc2AMH0yfWon WrXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=r9jiZXdMxIIkyZWDEljTg7/li1H7K2+Hf7E7i2HKYGc=; b=qmr66kOEevUaq+dQIDHnHNfEvj2LE0Qe0wWLZPcbfshmH5/Pv/72P1MAj2q2vDlf6X Razcm2zQf7KzlwNHUl/+kcHqTy/RZObqpcQCXr6p5VmcRAlXI7SaJlvIV5VPcpB50iaM w30+tF1WRGtmOUi4jPDD2EfUIHWNJ65FP+EO8/2ekBtfbOspGKcLo9kJE3FyKgq98mv2 FtALLzGYSDXhxal2F7vHBKtnFMul0yP3qqmFB1wtdD6dWi9peomFad59TsnhPeVRbOKy YjLhGco84nXjmhFyPswcZS9Jaadwy7JIixaQzUM0ZJl6hy0ZDbDeaoCIWy9xXUVgLQSw ODwA== X-Gm-Message-State: APjAAAWrdq0mt/ownyAl/ecx0C6N/W57zhpCPHYXkRt4TsU2V0KvsTWr Spb1UuB57RyIlEV+uOR8cKNWIw== X-Google-Smtp-Source: APXvYqykJpzpAMiKTTDl8UdnfFKBlbpKoN9nyd2Hna2WY+IXGQQpTm0QavLwq7y7hDtL3+CuxX3rEw== X-Received: by 2002:a37:b184:: with SMTP id a126mr5748865qkf.105.1569932791327; Tue, 01 Oct 2019 05:26:31 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id z5sm7042642qkl.101.2019.10.01.05.26.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Oct 2019 05:26:30 -0700 (PDT) Message-ID: <1569932788.5576.247.camel@lca.pw> Subject: Re: [PATCH v2 2/3] mm, page_owner: decouple freeing stack trace from debug_pagealloc From: Qian Cai To: "Kirill A. Shutemov" , Vlastimil Babka Cc: 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 Date: Tue, 01 Oct 2019 08:26:28 -0400 In-Reply-To: <20191001115114.gnala74q3ydreuii@box> References: <731C4866-DF28-4C96-8EEE-5F22359501FE@lca.pw> <218f6fa7-a91e-4630-12ea-52abb6762d55@suse.cz> <20191001115114.gnala74q3ydreuii@box> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 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, 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 wro= te: > > > >=20 > > > > Well, my use case is shipping production kernels with CONFIG_PAGE= _OWNER > > > > and CONFIG_DEBUG_PAGEALLOC enabled, and instructing users to boot= -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 w= hen not > > > > boot-time enabled. I don't know too much about KASAN internals, b= ut I > > > > assume it's not possible to use it that way on production kernels= yet? > > >=20 > > > In that case, why can=E2=80=99t users just simply enable page_owner= =3Don and > > > debug_pagealloc=3Don for troubleshooting? The later makes the kerne= l > > > slower, but I am not sure if it is worth optimization by adding a n= ew > > > 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 architectu= res > support it in an efficient way. Some require hibernation. >=20 > I don't see a reason to tie these two option together. Make sense. How about page_owner=3Don will have page_owner_free=3Don by d= efault? That way we don't need the extra parameter.