Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp877801rdb; Fri, 23 Feb 2024 03:02:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXm7ZjCyfCem8NFCDKGW0PANX0eZ3X64qWl47/5JC1NGFo0IZFS2PZPl4x4NJmXpiRa3M63tOeEfZRT+l5FHLNV3AgHqhic+sKArpc8+A== X-Google-Smtp-Source: AGHT+IHDkuWPqJL+Q58gqLgdwJc8k9yHVB+HiBfgkFFGoCS8tboDGOaOsFuON0Otc8ie6xk0t3C/ X-Received: by 2002:aa7:d413:0:b0:564:4ff0:ce5 with SMTP id z19-20020aa7d413000000b005644ff00ce5mr910622edq.20.1708686138336; Fri, 23 Feb 2024 03:02:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708686138; cv=pass; d=google.com; s=arc-20160816; b=K0LTl8GWkhZtyAXwQ9BIa6wWqWaEiRm/nV8azA4AM8rxxKIkVfcMkhtxKEgxXGZCIr gxuerALQPR4ekFjaqlQAE9i7q1r2Ee4TJZHSwUYNvuvSndvjm2uL18jf4n75AE4oSbe2 shggk8UFavR3j/drIkNMVhi53px2W6sdmb1rrMl+TEFAC/OjZxN4UFm7N876Rs1Zr+// 5FcaGib7D1ldOq0dSWzs81UDVuWs+Hl9iZzni1nKVJI1xShVXo7gL8iLKlb2Axx+yRp7 w4LgGpTBJaMqLaWCCkNbJQx+iPum4Yc++KSJqSqH15co/TwscisYjQTMfYLXaqxlM9DK kdzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=Gl112MpuWzCihqKFsR6Lqg9e1BT7tdysa1K7nxLWwoU=; fh=z+S7aEg+2scH110aQAzrD/LvellF57aTK8neYkS4Kzs=; b=udQLA0IjuG61aA3tq7uLIc0J5EKxo0G2g8ndDKcYihepXWkTRwyQ7o3BO0ol2SVX5X X8043crLB/Y4FMzWVBCngfm5W3Bjnmc1GPLfBbC5fPynqixuySLdHoZX87akFGNQagTB zYx7+2VAEOX8y0/T6oPfNmppvPtERZ3oTalOoGAbhJ7bGk3JRAf5bxj5S+kQ85oL7w2X 1nn7paBnRAgVIS3NcY2Z9axEXcQ2mYlWukr3SshkFOJ5KuOnM/sBlr0PfTVW1NjYdFgE Vxj1cUWqBj/dwqIczvnKicPYRd86hVMx0R3bTWMdkFl7XZYulyDNu6xNYELoubTk48tQ skJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=RiI3s1RY; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-78193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l13-20020a056402124d00b005640d1e7e45si5980601edw.520.2024.02.23.03.02.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:02:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=RiI3s1RY; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-78193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 13A1A1F21970 for ; Fri, 23 Feb 2024 11:02:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51B88604AF; Fri, 23 Feb 2024 11:02:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="RiI3s1RY" Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 369F15C8FB for ; Fri, 23 Feb 2024 11:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708686130; cv=none; b=ThEgJqDABCCxHKLtnBlp7p9H82c/E+SFHfgwEIrV8yv2SU77KET8VOKPkZO/D0hTnZi7vQfIFI76wlg7zeXABaqFr80FYRXyU22Bq5BvLdTZokrSv+fCK39/le3iefELuVpnWF6XuYbjb0uwcfLDc5c77KrRHUzipjOWveGDsD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708686130; c=relaxed/simple; bh=Hfxzy3m3rgoQVAi2T6JlKhsaZWQmRoflxQMoVxc8DW4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e/QpIGG2d1ucm+tma2Sp9dAwNwqrFNaz/hct8jUdnVTNvJyD0mtXFug1S/BpTOsalufbU5rIzxrXuhHF6tIMKNRib12aw2yc8k/9E+Lp1c8+pfcciHGPFtejf9zVh/wTpkuXmM5AvW4cJIYZMVF5NNcGjQS0iPaeehN9Ncb091w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=RiI3s1RY; arc=none smtp.client-ip=115.124.30.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1708686120; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=Gl112MpuWzCihqKFsR6Lqg9e1BT7tdysa1K7nxLWwoU=; b=RiI3s1RYtnt+gUyeF7j3H8qiLEiWVvIxstg4LK2QvioMWfjJ+7Yy06HhSipeGWc6Y8krtwFJn9vzYA+LIVTkSmaAzKgI39ZJOEk9+dy8CFOu+z1dd2FEv1hppC4Cq3R7TIDV26UO2nNcrxFpyJESU8j4h1xTLFswHDfZ9xr3EdU= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=liusong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0W148c6n_1708686118; Received: from 30.178.80.102(mailfrom:liusong@linux.alibaba.com fp:SMTPD_---0W148c6n_1708686118) by smtp.aliyun-inc.com; Fri, 23 Feb 2024 19:02:00 +0800 Message-ID: Date: Fri, 23 Feb 2024 19:01:58 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm, thp: display [never] for defrag when THP is set to never To: David Hildenbrand , Yuanhe Shu , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240222115323.4925-1-xiangzao@linux.alibaba.com> From: Liu Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 2024/2/22 20:14, David Hildenbrand 写道: > On 22.02.24 12:53, Yuanhe Shu wrote: >> When transparent_hugepage is set to never by cmdline or echo, defrag >> still show what it used to be and can be modified which makes user >> confusing whether defrag would take effect. >> >> Actually if transparent_hugepage is set to never, defrag will not take >> effect. Just Display never and remain unchangeable to for defrag when >> transparent_hugepage is set to never. >> >> Suggested-by: Liu Song >> Signed-off-by: Yuanhe Shu >> --- > > No, I don't think we want such a dependency between both options. > > You might just end up breaking existing scripts (enable defrag before > enabling THP) for no good reason. > In certain situations where khugepaged_thread is NULL, it would be more reasonable for the value of /sys/kernel/mm/transparent_hugepage/khugepaged/defrag to be 0. The patch should include a fix for this case. Thanks