Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp834658ybg; Wed, 3 Jun 2020 15:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBdIiq/UWWMYuqCWXyLM1bUVeihsZw9Qm8r0zjfxZrIC6rQbycl+id+dI+R+vjxf7p5n/t X-Received: by 2002:a17:906:39a:: with SMTP id b26mr1371475eja.204.1591222317514; Wed, 03 Jun 2020 15:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591222317; cv=none; d=google.com; s=arc-20160816; b=sJ8oIiWLlpsbFm3LrHXCX1hWi6P4bIvTS7tx/gHRKmvfFShzqlhkgCClylIStkMWgP 0Y1GWRfHVPQJAaBQf341hwXHN1Ugy0uWal3siZ1Cn+XNzHGxvofaaARdTJiR6PKWohB7 QUOst4UmP7uwQi+3gIbfw388mThzlAylHq2gQBR4g5CVkJHnSOX0qdiHhkL1mQzYplf/ ElqMtaKbkhTJ8J0ioxL6Y+k97AEgRcdDrdFVKvmZQw6VaIOWJccmzLq9odCkGjlrpTE/ Y8AyjxtjrnVf4iCHxeG6Th+O2boRiH3YQr94ErG9Da9t7mrSltlDUN7sQh3wLcYYxS0K GT+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=RS2c9kZDiSJ98vsYaz9BsTuQco3vPT2+KZpRShvSiBY=; b=I3LAs37Xf2fLOeQrd8Y3ZDIbP32HqMGzpdCaMmZ9PW5/MAqXMGL7py6vEJn0/7jUCM /eP7RsQEqztDBvHeqBlSuK2vAT1VZr+gaE2sfBf0bf5HJID0CLwKaPGjITzcoJvpZ7Xo LweedqJqKBh9AJQWPCw50RtvDaAK/d0kO0AEgzLjcRQUh93C5qdXDpFjScyCUgKPfNi2 KGYW/ic85GLI/0Uoqruz5yIhivei+xg7Nr0gKbaqyF2U307x2U9FRmgXaPm8VSR9MJPw IbSMmZRW3XWWzasneS3ixJbF+ZE3orMacMxf5Z/2kWoKpkgNaPxUcoWpRkrqEKIX+UK3 2n0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oq17si420260ejb.666.2020.06.03.15.11.34; Wed, 03 Jun 2020 15:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726693AbgFCWJr (ORCPT + 99 others); Wed, 3 Jun 2020 18:09:47 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38977 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbgFCWJr (ORCPT ); Wed, 3 Jun 2020 18:09:47 -0400 Received: from mail-ed1-f71.google.com ([209.85.208.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jgbZx-0004Eg-5o for linux-kernel@vger.kernel.org; Wed, 03 Jun 2020 22:09:45 +0000 Received: by mail-ed1-f71.google.com with SMTP id y9so1732512edr.22 for ; Wed, 03 Jun 2020 15:09:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RS2c9kZDiSJ98vsYaz9BsTuQco3vPT2+KZpRShvSiBY=; b=aVwsEoqTHHwUqbtzzCEcLfQpVkbmHceNvWgpToAPiCmu3Yjep5u6IbHO2T/cuoRX+g YRWXRmM3hr8npIhbmAMojmSYZUipMsDczdrZsrWgnAYv2aOtVGEgxUxQj54Fb4kPy+bM E18Ai5e6oChLpLdMwOKfo12F9fd6+lCjpZmKK4yrDiPFcFxCxhRWcQgS6rxiyywYOBL9 bKFfdvH+kIgc+SKDXeA/8KfDZC7h03pCl2etnOzKaPwPZflTznZn3n3CrCioaCcryNGA A5CsFtTGYSSmLhlNBq6xOizlvaRD41ug5vZQTz5NpzGWyMVq/Ljl8zjg4zYJ08CaRjoo XxHA== X-Gm-Message-State: AOAM532t10WEduTWwMuMzD7Jw0Ed/pv6e19ZsIkDjIot7t/i5emHH+OW 8XEuDGnr7AbgrnYBFn/ifihMefOH5hM23MHwOncMcNUU7W3BZcs8YGm9BOhiQ7mncIuHraw8GNi 2EVoQqyrm5TmT75vr/Gvo5Go9yzA8eESl0xcWut1Kg4iHFCdh9KZOyb2T2A== X-Received: by 2002:a17:906:71b:: with SMTP id y27mr1279181ejb.537.1591222183858; Wed, 03 Jun 2020 15:09:43 -0700 (PDT) X-Received: by 2002:a17:906:71b:: with SMTP id y27mr1279156ejb.537.1591222183619; Wed, 03 Jun 2020 15:09:43 -0700 (PDT) MIME-Version: 1.0 References: <20200603065049.11598-1-gavin.guo@canonical.com> <14faa6c7-6701-7a8e-3e88-4febee20f56e@suse.cz> In-Reply-To: From: Gavin Guo Date: Thu, 4 Jun 2020 06:09:31 +0800 Message-ID: Subject: Re: [PATCH] mm: thp: Add new kernel parameters transparent_hugepage_defrag/khugepaged_defrag To: David Rientjes Cc: Vlastimil Babka , linux-kernel , Linux MM , Andrew Morton , "Eric W . Biederman" , Kees Cook , Luis Chamberlain , Masami Hiramatsu , Christian Brauner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 4, 2020 at 3:27 AM David Rientjes wrote: > > 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. Agreed, I'll try to investigate more on how to do that in a generic way.