Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2264192rdb; Mon, 5 Feb 2024 00:29:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3jRpdSx+snBzhI28JY89r3wwsSpuEaAbmDu4edIYz4WRaGjS3TpkL4mAn8GJruvcKTBNm X-Received: by 2002:a05:6358:590a:b0:178:9393:176b with SMTP id g10-20020a056358590a00b001789393176bmr16602253rwf.16.1707121747376; Mon, 05 Feb 2024 00:29:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707121747; cv=pass; d=google.com; s=arc-20160816; b=oLLyA8wZRRBftguh+PS/wkgVfjubkPvTzbD95tYeGM7oSkcIp+6ksryGqYDu3+dut4 Mh+6pV2CH4cCg+pgfiU5Mq13GHvarIj32FoZ5iPQdqQIqUgxVtBYsRCwxvLDd4ebH8t3 ecyLM75BwJjZ1BSf4AC9Okk2WZo2cFTb45WEPkpy1Ui4mWrR/04TnNNYmAkwDYYV4vg6 GjeywNgTXA6RU2vRDQfIwgN/5qPiFSLcZd3wOqpulrtuXsjNS3RMHOST/uXUohm6+sS9 DSGuW8xSC8QLEkIWMjqyO8nq+/qTV2whtx0YeTQoMc0DSWOJcbA8uFo2xNsrH0o0f9jY 6cuw== 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=YKZXLXscoo6WspId5ZWXzvGxFuSp7LUnE6//QnlzEM4=; fh=hbSY4Gu3KRHJd3K1VUyZLOx6KnYuIN28TIajX8dvdMw=; b=UmiEa6k65O60TP4Qto4AUZEwPxMnO0jpAYeBG92085QSoMKCJlKzNsu2bZXowp9kP6 0eSYBKhws4VIHvlqwKrvOz2W8jgLbMgTq7A+/39oUPTNxfdBWCb+aBdl6LQDGUbPnSYD 7KcYxT3iGY/VODWupRukCmNssAPlFTIHm+bUF6FWVPLewx3r1idM536V6iHK+SCoGmuC qRihAkN4oAhW4nQusGGr7DW8IprQJtQEfq2sda5Cm5RmEaJ7uU+jpFa6IiPDRVUEaSv3 MVmBirLoHWaA5V5bHfbeXt82z6MxeSi/ugwnccpSVOFJn4ZeBGex97lG3nWEBPgYU3S1 p7wQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=buWZpWz5; 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-52207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52207-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=1; AJvYcCX685OipSZ/r1WYQHRPpBsWnwoG9bdO0N6q03cpZ0g4ED5c79JuanGxxAKEkz/dnU7NObS43J2nJmGfCyWrNgPKwwQWADrZKLqOrEK7lg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 36-20020a631564000000b005d8e0d44d86si5597234pgv.553.2024.02.05.00.29.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 00:29:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=buWZpWz5; 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-52207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52207-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 C8610B21423 for ; Mon, 5 Feb 2024 08:29:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54E4711702; Mon, 5 Feb 2024 08:28:58 +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="buWZpWz5" Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (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 3A8E511197 for ; Mon, 5 Feb 2024 08:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707121737; cv=none; b=gEzgUuICtkJqXbj+T7hg8H9fEOy5O+XIfSMc0wlY7EzeFqZR12To/+/25kg11lnGRl4JDYsdDsgYJJlHaVxCjyfdnGtHTIe+jAtF/ViRwQD5OuWLuC6Hhu1T5qeNN59piScRBA63rBhk25laWNn8z6UHBkOHgG/6AMZycP0EFzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707121737; c=relaxed/simple; bh=jOd5U/bcfwo5nJJLVTP/vq+7/o/XA1zDFdQO4EvAeJg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=D1gOs4nyOlLKMqYsfW7Tzk/gy6r6qrz8MZ56MRoZ/0M7uVqu+6Ll/PnwShRzNwW7rFmN6iaB3sfgpWcUhhp9+X8TNEpFKpqKue/FFAAr6ZpHa6NIGCW4px+tCSC1+HHUqOZx4pDnmvNkhLpIYx/PigvX2xL84fEoWcOJCQK4Lbw= 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=buWZpWz5; arc=none smtp.client-ip=115.124.30.97 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=1707121727; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=YKZXLXscoo6WspId5ZWXzvGxFuSp7LUnE6//QnlzEM4=; b=buWZpWz5AxbROfZXnzFTU6PLCC9OSwSXa3eoOxYbV8O95Jvs8/JIbSqqzKpXGZ44Pm4MZvopiyYly83r5AusGTofmvT/5cjwgw+C+lXrBxq4Yp2M5OVc3ClZ81xsL3Jl2f50ByXQ9ZF2W+7aV1xKvsxmvYOSUdHOMqhJTJnZITE= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W064Cfa_1707121409; Received: from 30.97.56.40(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W064Cfa_1707121409) by smtp.aliyun-inc.com; Mon, 05 Feb 2024 16:23:30 +0800 Message-ID: <2d6fa6b6-db90-4ba8-9205-437593bc2f9b@linux.alibaba.com> Date: Mon, 5 Feb 2024 16:23:46 +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: hugetlb: fix hugetlb allocation failure when handling freed or in-use hugetlb To: Muchun Song Cc: Andrew Morton , Oscar Salvador , David Hildenbrand , Michal Hocko , Linux-MM , linux-kernel@vger.kernel.org References: From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/5/2024 2:56 PM, Muchun Song wrote: > > >> On Feb 5, 2024, at 11:54, Baolin Wang wrote: >> >> When handling the freed hugetlb or in-use hugetlb, we should ignore the >> failure of alloc_buddy_hugetlb_folio() to dissolve the old hugetlb successfully, >> since we did not use the new allocated hugetlb in this 2 cases. >> >> Signed-off-by: Baolin Wang > > OK. It is not a fix (I see a fix keyword in subject) but an > optimization for unnecessary-allocation cases. Thanks. Yes, better to change the subject to 'mm: hugetlb: improve the handling of hugetlb allocation failure for freed or in-use hugetlb' Andrew, could you help to change the subject line when you apply it? (or you want a new version, please let me know) Thanks. > Reviewed-by: Muchun Song Thanks for reviewing.