From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f42.google.com (mail-yx1-f42.google.com [74.125.224.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB6273191C0 for ; Thu, 15 Jan 2026 22:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514661; cv=none; b=r9F2tLjPm9ElObpa9qHaOm0NUhFVSHJKBCvByMKkwH9sQQsPOMC5JeeETVGgs+Luzjvch90+GNx+lUtP/IK5SmRp0pAQzKPgv/SOabqY1t726Q+5/p/4TYBwTSEFf+qZGDCv/Czp0Tw4Q8XWPP1o9eMGNyY/43ryPLMuPilI5CU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514661; c=relaxed/simple; bh=sx3e+ntNRwAjEj0MnJSn803jMg3ORHVc1o9nabSUc74=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BsVBK9tjxNGPKq9Y2n9FFQSkapRMe6S4BmHOWeCLzVQCjPZtuC2XHNcf4eQAvYKk0GDogLv9tXbxhux1fw8T9lKDyrCU5+YzEIWjgRTfOHQXoAw4Pcr5DY7YWp92CFVil1IvqqNKU10x73KQC7H0FeKogjbnIAjwd67O081swKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TB5jmYe5; arc=none smtp.client-ip=74.125.224.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TB5jmYe5" Received: by mail-yx1-f42.google.com with SMTP id 956f58d0204a3-64471fcdef0so1206768d50.1 for ; Thu, 15 Jan 2026 14:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768514658; x=1769119458; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t+9teuZrdc+h3p8sfeWroQ6OaORAFW0bgvjwel3oUcI=; b=TB5jmYe5jWdU0E4AGqjBZIQK3KU9Cs5k6QNabd13kU4cicf961X9LGuBFD2Ns3Gxtr 6qiximfku/3XWozDicRb8ZOWfgJO78tvGb3IL5eRIcNLITF7q5ouQqc0xG9VVtAMU9Sx 0jnrBZuwLBJh8wOkzcruaYkfGjYjXmq0wBVT7knYiY3qRCDrHOiBh3iu8qqgRyPDpfR6 HdQbYU75UyFJQWafnqNZ/Z5pKL1RkaJwl63FLK9aA1WdMLbEH0vM1J/Q7CUW9kj3LWNX o5EVPI61ti0Af/yKcrpdHnIIIzyFtX1qydYrRJjd2FqrGmVMmlmXZTNSOxkmWEHl16kp DNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768514658; x=1769119458; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=t+9teuZrdc+h3p8sfeWroQ6OaORAFW0bgvjwel3oUcI=; b=MkpDKYDBuBthkpMY666kV2FKJbpThCjskt6bT6KSddoxmXQuXUKW2e6TvDCz1f5CvO IhZE3esjxjWLDbhipETyxTlZW6k6xwRmsLKqUYclIHwU35WUG4Rp1yFFXRm0Rl7dnWwX RaHA3MWOAfKpM9fWM84e7HOsZk1t5EYVqJqVgtpmcVvSdnhLJr41Z/mlvtLy0bGACPJk 3aI0OJusoEhLOACLFOJMEx4B+xBp0QUi3u+P0X9TDsNtB2IJwo0Dye79SD1lyW3rf4/I vO9wu4VJcV3VOZgC/jghUouiTz+PNcN4IeGPccs9FsNYDa2FnEhABQcELADwXWq1Qv1I ihwg== X-Forwarded-Encrypted: i=1; AJvYcCWVGgE2V0qCl69ZwO3zCzOSK63nU7bk7qJGGEAZ3LjCBQ98XS9T9nV+/V8KXd5FOElpJ0uBUEoZYDyQQ7E=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5EedilA6QNRt376m3qsopOc8YfvhJNBFu6IBxV5n+gnwwU+hP e6JTWD+WxdZCJ7m1i/xe+1nD9mh5IpgxPvrX2vJoun1VL0c63wNA7q8R X-Gm-Gg: AY/fxX5LD0URhw/x5e0lo4+fAWB0XeSOhGIyoy+CfJhuV532I1EkT+7p6j1e3d8BAll nH+pLMskw4yW9E69ys11SsAqAIPj74I6k4BuFL51LU/7P6fCn1WryzTZlzdmbDySqr9MziG7Mo+ kH1tlOZ1wIW1jNsQGWq3M64yUumQL/+6c1oCNa4JZCFe4X/HULAUdVLVWx7k7jG6TjChlfSo1W2 ZS8gzcbh96kaiXpL+n4jMkFZJbhzR3uP44zZPSwRPRz9TuYgebDRvZCKybJxyWtctD0fsqqhohH dvYmHQnCIOQb9hxSIH8ON4qXQp00NH735kIKfZkxbjTQGLoPAyFQOaTy+EtbHZCUrKZ/Z6rOKdl zV0royAYcUEv8pQk3v6wKewRIjoyeZDikLTZPpIGmqsxJCUYhroFIkHvp8U0ha/9GdEnn5SGd79 zE7gl0Xg== X-Received: by 2002:a05:690c:13:b0:786:7a54:4624 with SMTP id 00721157ae682-793c523d4eamr22873687b3.7.1768514658560; Thu, 15 Jan 2026 14:04:18 -0800 (PST) Received: from localhost ([2a03:2880:25ff::]) by smtp.gmail.com with ESMTPSA id 00721157ae682-793c68312adsm2198147b3.33.2026.01.15.14.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 14:04:18 -0800 (PST) From: Joshua Hahn To: Andrew Morton Cc: "David Hildenbrand (Red Hat)" , Muchun Song , Oscar Salvador , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/3] mm/hugetlb: Remove unnecessary if condition Date: Thu, 15 Jan 2026 17:04:16 -0500 Message-ID: <20260115220416.1749150-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260115135942.843342c483b44232b599a61f@linux-foundation.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 15 Jan 2026 13:59:42 -0800 Andrew Morton wrote: > On Thu, 15 Jan 2026 16:10:51 -0500 Joshua Hahn wrote: > > > > > - spin_unlock_irq(&hugetlb_lock); > > > > - } > > > > + spin_lock_irq(&hugetlb_lock); > > > > + hugetlb_cgroup_uncharge_folio_rsvd( > > > > + hstate_index(h), pages_per_huge_page(h), > > > > + folio); > > > > + spin_unlock_irq(&hugetlb_lock); > > > > } > > > > } > > > > > > > > > > MAP_CHG_NEEDED = 1 > > > > > > Acked-by: David Hildenbrand (Red Hat) > > > > Thank you David, I agree it's helpful to include MAP_CHG_NEEDED != 0. > > Oh. > > > Will add in the v2! Have a great day : -) > > While in there, this: > > > > > + hugetlb_cgroup_uncharge_folio_rsvd( > > > > + hstate_index(h), pages_per_huge_page(h), > > > > + folio); > > contains now-less-needed 80-column party tricks. Ah, that's a nice catch as well. I'll be sure to include it as well! My bigger motivation for sending a v2 was mostly to separate out the fix from the cleanup patches. Since they are separate now, I'll send out a v2 for 2/3 and 3/3, while I wait for reviews for 1/3 and send out a v2 for that one at a later point. For what it's worth, I don't think the fix is super urgent : -) Thanks again, Andrew! Joshua