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=-12.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=ham 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 68816C433E0 for ; Wed, 3 Jun 2020 19:27:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2ED3E2067B for ; Wed, 3 Jun 2020 19:27:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jUsMlR1R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ED3E2067B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B4BBE80007; Wed, 3 Jun 2020 15:27:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFCF88E0006; Wed, 3 Jun 2020 15:27:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99C0C80007; Wed, 3 Jun 2020 15:27:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id 7EF0B8E0006 for ; Wed, 3 Jun 2020 15:27:08 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3E22B180ADD87 for ; Wed, 3 Jun 2020 19:27:08 +0000 (UTC) X-FDA: 76888883736.01.sort26_3e3ef2ad4a70f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 1814B18000899 for ; Wed, 3 Jun 2020 19:27:08 +0000 (UTC) X-HE-Tag: sort26_3e3ef2ad4a70f X-Filterd-Recvd-Size: 4213 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Jun 2020 19:27:07 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id s88so31590pjb.5 for ; Wed, 03 Jun 2020 12:27:07 -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=ZSMftb7icpvsyoSXS5PItKRkVfeyWpaHE5r3DB6Xjaw=; b=jUsMlR1RT79CKfLxfCazzC5c3SsnKZ63d+zPHXbyKcdCsWKSVfVL3O2CEW/TfCKNCi ZYqei+/mQT997W4IhEAfGWVljykJk3lwib2/cbVClPBTho9E/LlyXw9BsLXswPqsuiPm rOs5eiSxxU+ZwsSWVsAuCOLj9oF8KdkAL393IKwjel24G+wdWoHq2V/5pwtgktNjlXkN XKkDzKg3+nLQzKp7awmKSzvi2dO62h3bd5TaQYNX2Hkx8nWVylnbc/7Hypkf2IwMPfhD mRV+Y3P45x4pzNdcRTkkBBPK3d/Gz08qKPXEEoI1UiT5uYsExgjiQDNd46eqDZ3Tk2t2 ohHQ== 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=ZSMftb7icpvsyoSXS5PItKRkVfeyWpaHE5r3DB6Xjaw=; b=RD1MPHC0wd5iAtzyrS8Q9yZrBCr6scsDLYqZKcFwPkvxLE8oeS/yl7cZ8eEt6qtv9O 6216dOk5/faHmvn+KBjGuDa86tuR1kgA1OeSJtaueKJ8nu6Dw8KC0ozUAFqs3LKdfiza 9wavGqfpb12zMjHd9oQju45RESWtqs/cDROTwx20L3CUOWHr8YFY7oepvavZ3E2UStCh vR3LhTymCCKBvChspdE+lfmQiaHloTxBLhfh66tuPG9+Pmu9xUd4kDdbf/+8rHg/xmES GMoPYr8nWRndoPr1a8AyaCiX9E3wCnYxVR62fbswmcHMcGtPZYmd9Y/dOcmhElwNUY// rBaw== X-Gm-Message-State: AOAM5334K2k6VaFHGz7INU1Gdkcwti85GVEsH/tc0sf4ImXQbtTPwREN WloAdNSTvk9cGbbA8J9dDd85aw== X-Google-Smtp-Source: ABdhPJxRTnU49ECTZHBARL7gCHB5oOpAcTXW29vDl04+N4qcbHdJif1wNxlxo4PGXqJS2xuxVsBC1w== X-Received: by 2002:a17:902:6b4b:: with SMTP id g11mr1320561plt.9.1591212426385; Wed, 03 Jun 2020 12:27:06 -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 nl5sm3538815pjb.36.2020.06.03.12.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 12:27:05 -0700 (PDT) Date: Wed, 3 Jun 2020 12:27:05 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Vlastimil Babka cc: Gavin Guo , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, "Eric W . Biederman" , Kees Cook , Luis Chamberlain , Masami Hiramatsu , Christian Brauner Subject: Re: [PATCH] mm: thp: Add new kernel parameters transparent_hugepage_defrag/khugepaged_defrag In-Reply-To: <14faa6c7-6701-7a8e-3e88-4febee20f56e@suse.cz> Message-ID: References: <20200603065049.11598-1-gavin.guo@canonical.com> <14faa6c7-6701-7a8e-3e88-4febee20f56e@suse.cz> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 1814B18000899 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Wed, 3 Jun 2020, Vlastimil Babka wrote: > > There is no way to set up the defrag options in boot time. And it's > > useful to set it up by default instead of making it work by a > > systemd/upstart service or put the command to set up defrag inside > > /etc/rc.local. > > > > Signed-off-by: Gavin Guo > > Well, maybe isntead of adding these handlers, we could extend the new boot > parameter sysctl support (handling procfs /proc/sys/) to sysfs (/sys) as well, > as Eric already suggested? [1] > > [1] https://lore.kernel.org/linux-api/87bloj2skm.fsf@x220.int.ebiederm.org/ > Fully agreed, I think the solution needs to be more generic since thp defrag isn't special here. With the generic support to tune sysctls and sysfs tunables from the command line it seems like this patch would be redundant.