Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp747174ybg; Wed, 3 Jun 2020 12:31:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxss+5tFxNZui2ZWTfjBaceb/kF3KHSILNsJ2tTYw4lk/tunlYP6qAZ79rT7xPCKCQsWXXW X-Received: by 2002:a17:906:470c:: with SMTP id y12mr806798ejq.336.1591212695027; Wed, 03 Jun 2020 12:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591212695; cv=none; d=google.com; s=arc-20160816; b=cfGNIsStdLwGSECsisZsqGT/Ik2srsrvZLCVImobwlcCQzo1af+b4CJNixDTgop1O0 +rEL0KQFiMaTSbDiCmXYWbwA/YGW+I0H3bhKB9PUl2x9nRkRQ7UaUZOPc+j3mCmuUEUu CEDawm3IGrRlpsAvwMUh7QhYCDMjPXzrVSHIrxJrRD76STC746Rq/Zwiv5T3q03qANDT gS5Gmvlsm0Xn8iDYzefHGfs7B9ewz7tqTOsUZxbjaDZdjv0Ij4u04HuSRx5pIq3uqpqM LSwa8gzewnD3GA1K9hGHnMA3/6XDBnPxW1DUykY27w9QXD5M6FydRDIp2oLlHodOzzDM JTNA== 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; bh=ZSMftb7icpvsyoSXS5PItKRkVfeyWpaHE5r3DB6Xjaw=; b=QLXC7mIckwse0xAYSw7SVH0VgFli3JM+02y1JeB6qqq3WUsDnQChDyPM5JSi0lHcVM skj1/nBEz41nAfR8oufvlXDxrl4cl4dNFhhrKDW0Apgo6daeFNMvgKk+QFUGb9p8IUkr alAjLz/9KzU/UK6o5Mmql+RiwlcLysjVuu4Vu8kt43+gXtOHuccKtKhym0n+tA5f0qPc IGcjb9C5bb//Ey/iVbmMeS3uq5lyTOLN9hVwNZ2v11gwH3h/xbI7hflbdTTLS9AZO65y 3bJ8w93vAWOHTq2ALHiQN5CSDFwwRcxdaACcwOo4UGsIZVebv9JQnsI+FAhY3Jg8fzVb Z8Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jUsMlR1R; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si262804ejk.53.2020.06.03.12.31.09; Wed, 03 Jun 2020 12:31:35 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=jUsMlR1R; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726086AbgFCT1I (ORCPT + 99 others); Wed, 3 Jun 2020 15:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgFCT1I (ORCPT ); Wed, 3 Jun 2020 15:27:08 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B5AC08C5C0 for ; Wed, 3 Jun 2020 12:27:07 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id 5so31385pjd.0 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=cSj3HrzKF/ZhwABQ5ta2GzHgcLcamcayXp0GVbptqdfEgkjk/ZYqDoiMz50AKCCZ+0 rs8UP9wsh3xCRCHDPLQ56Hcio8VPMmHrRlILKHPjrPao1viXq9zXlACNT7iVUTA0IglN sp52dIBjMZ29o/VowByCDB8F+9DsPLYgPQdKeNYvI2789JDS5x+EQU8or92uK1gOk1NB IAWpCOsShN38CboJZ2SpVgW1Ecl0yGR89zo6JKTUrVzEQgTJquIywXUeEE1KPJBuA3Cu w4vSCuQdS6NOn6udQtRoev5++Sei0fwNqnvfu8N5i9SGsmF6cVbXBYf2QZNdpcdCP3eN oBxA== X-Gm-Message-State: AOAM532LOrxcMRZRSwjhS6laQO6ga5QAjEizOa7zfvrjKQZ/wpCnvjy9 Ege037KIdQ/uB1EPxxXL0nlkqA== 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.