Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2894193rdb; Tue, 6 Feb 2024 00:25:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEFvhYG8+q/rInyeyatgvJ9eH9MXDr1CTy6VB4UhBDy6VaYRDFvIG8htprQkmuOMS/yiQQ X-Received: by 2002:a17:90b:110:b0:296:1a66:bc64 with SMTP id p16-20020a17090b011000b002961a66bc64mr1626227pjz.40.1707207915152; Tue, 06 Feb 2024 00:25:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707207915; cv=pass; d=google.com; s=arc-20160816; b=jxT6u6poZx/7EFVEy1YdG+lv+UuVuUIIRJawoEt1eidNvOlDunFgjzZdNUn3pEnyS/ jofNvq2ree7jZh3fH8Rtb7MTWWP1zI8o4Vt/uV01wBwFTrekzmb5vQHTOoBG9QBi2TMX Tzk9+dU8oucrh4V7TQewreogQ1riB0OxmXTtr5HMfdGQvl6xXNZwuDyAr70DdaS6dHDF 6gaeCHAyo973KAG2gByB+MOadrMph2iNlm664e8djCwMFDcNd6lxss1LO8VbSiurLBUs +XQHfz/XOGrDjm8Ci59s/EDHs4c+BKp/CxA5bB3Qand7Fz9ElV2ovLCoug2Pg6O+qJ+0 A3JA== 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=n4L712Wu1atDoWRSzGANCoeLDJJJ+/sOVHYz/0n8058=; fh=8Y6I7rm6igwiTXu0lvKpjPwMA8XtwCQLtdoDs4iOKv8=; b=aJLUeu1KN6cHkhe4BlSWAqZOu/kXu4vUnmgIGpzSalpa8+fhsfh9vR5KN+2LM/u3n0 4BxuqDtgmaEzvIIAnqmj1FS9qC25DxcqDpKFy2jvPSZghhsuK8C3ZzgsX3oafbByEp8r sGmF7TptSQOC/JXO3yrHuFYN9SMld7zh7yF3M+M6DDVTm9iygHomNBODIWDVOtOXZjEa 6r7Dw7HHEIt7w8tWrn/r92P0nuWIrhGjaiZPDXxqaBmk4RAcjeu9SyHwerItYymAUKJe dt2FTUqUYg4KQWRT77EXjZv4dHs7LomIfoB21af0XtLmeRMyto9wE/Fmjnclt8+kb9kw ClLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=as48I4e6; 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-54484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com X-Forwarded-Encrypted: i=2; AJvYcCWYxAQ0DXDdWwBEaio6gIzOtRBJ0RtVlVfUWXqPKHBFQEWUWDassxpVg9h7wGPPr8wnKEGzK2tS4jdHCADPR8RJi8VIKygbQJwWQlISCQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id g8-20020a17090a9b8800b00296160ca657si771995pjp.97.2024.02.06.00.25.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:25:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=as48I4e6; 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-54484-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54484-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id ACD46B23ACC for ; Tue, 6 Feb 2024 08:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB56112BF1D; Tue, 6 Feb 2024 08:18:36 +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="as48I4e6" Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (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 82D9A12B169 for ; Tue, 6 Feb 2024 08:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707207515; cv=none; b=L0jqPW+4hZnP4Eb4aKQ0jO/7UD618zoP8suqKhAS/9hmVYYS6J7KqC1Gbo8AdrZzz6yYlje4lYxHnMl7qBpbjdu/ukIjU9m86x4w/YDMsB9AhTQYovtNM7pNEXqY7NUkufxf3CB8kpzTgrl05PtTyFupvRkpCbi9LK0dJp70/1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707207515; c=relaxed/simple; bh=V+or0CGYqI/j+yVcolyQTN6SWKGZbzOrLpDMheqhgoE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bx6KOZ0cHrLB0bt+zGHWn+k3L/KTxWI58xCGoG1qZm/AGSTTLu25suRCYUB13rgbc2Ex0MDXlUUq4/iManJL1kmmqRVGVGUrXAgRDDLVq9PBBTf9dq3Q9oWr+8Q1ashB5ojyS2BS4RvyzauNujD2MhiP1m3zpJ5+bgdS+HyfjgA= 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=as48I4e6; arc=none smtp.client-ip=115.124.30.99 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=1707207504; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=n4L712Wu1atDoWRSzGANCoeLDJJJ+/sOVHYz/0n8058=; b=as48I4e6lOZVB1c5zIx1hULRCIt2645ZSkGQc/pFnXDI7YiwVbCuRG+UK+NCJkl1T0eTo2X+V1fEBacMzgzTZpMz2wDLPt6ifsTLPu85zT7zlh3lHQHk+kRprs/EqMoF9C8miuLdjJ2MMM1RstPCL7JkpnOfWOZ9RrvXJQd89nE= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W0CysvU_1707207502; Received: from 30.97.56.127(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W0CysvU_1707207502) by smtp.aliyun-inc.com; Tue, 06 Feb 2024 16:18:23 +0800 Message-ID: <67e0d81f-7125-455c-b02f-a9e675d55c6c@linux.alibaba.com> Date: Tue, 6 Feb 2024 16:18:22 +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: [RFC PATCH] mm: hugetlb: remove __GFP_THISNODE flag when dissolving the old hugetlb To: Michal Hocko Cc: akpm@linux-foundation.org, muchun.song@linux.dev, osalvador@suse.de, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <6f26ce22d2fcd523418a085f2c588fe0776d46e7.1706794035.git.baolin.wang@linux.alibaba.com> <3f31cd89-f349-4f9e-bc29-35f29f489633@linux.alibaba.com> <909cee7d-0201-4429-b85d-7d2662516e45@linux.alibaba.com> <2613b670-84f8-4f97-ab4e-0d480fc1a3f8@linux.alibaba.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/2/5 22:23, Michal Hocko wrote: > On Mon 05-02-24 21:06:17, Baolin Wang wrote: > [...] >>> It is quite possible that traditional users (like large DBs) do not use >>> CMA heavily so such a problem was not observed so far. That doesn't mean >>> those problems do not really matter. >> >> CMA is just one case, as I mentioned before, other situations can also break >> the per-node hugetlb pool now. > > Is there any other case than memory hotplug which is arguably different > as it is a disruptive operation already. Yes, like I said before the longterm pinning, memory failure and the users of alloc_contig_pages() may also break the per-node hugetlb pool. >> Let's focus on the main point, why we should still keep inconsistency >> behavior to handle free and in-use hugetlb for alloc_contig_range()? That's >> really confused. > > yes, this should behave consistently. And the least surprising way to > handle that from the user configuration POV is to not move outside of > the original NUMA node. So you mean we should also add __GFP_THISNODE flag in alloc_migration_target() when allocating a new hugetlb as the target for migration, that can unify the behavior and avoid breaking the per-node pool?