From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C8DFF2FFDDE for ; Thu, 15 Jan 2026 21:59:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514384; cv=none; b=uelmtrPFMEb1glIKN+ScsQn04Iy/jhhs03bwJN2xeISOo45dZHg2LktgGfm6lgf9N77orFbLobtdMsYBVeYmwxpOJgskijWFmsJGdgt2YPCJxVCYbjdrs1+okOX2MhNRqOM/Ptq5zNjoW49FzStEv8s9PLDusv2Sf53VJDvMgl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768514384; c=relaxed/simple; bh=8jlcVgdHaP7bz8GH5lHbtaAvk0c1AbsLQUU1eMGngws=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=NxG0ejCKWyi6+K95PvZ03pH4+ZD5SBMS3caJOp5J/ocdNuyhy2rOnDV7M/12kspeOYqV9X0DPvtI3FXHFmCclZjrQG+16GN0l2SRk3bRi4HaI7gKvpphETmR6A92RbgNqy93/JC4uZd/4yFjT/XQALb6aP0w8gkYY25SDNE9lQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=N/q4xual; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="N/q4xual" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B054C116D0; Thu, 15 Jan 2026 21:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1768514384; bh=8jlcVgdHaP7bz8GH5lHbtaAvk0c1AbsLQUU1eMGngws=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N/q4xualLsWaXEUvD6XSf0/r7zOO/Ano8FQ+Ffzu6ZAErp8MilSxrSLi+umQr5F21 sKQ6kBEe/R4g9DtdXLCNPGJ1rxlteINTAtT+hqKE3fZIQWBY8qO1TgRWg8bVldrhKc 01ZTY7URoJFmQNMdSHbSZn+/n2XkxPNBYc6pXTl4= Date: Thu, 15 Jan 2026 13:59:42 -0800 From: Andrew Morton To: Joshua Hahn 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 Message-Id: <20260115135942.843342c483b44232b599a61f@linux-foundation.org> In-Reply-To: <20260115211053.1406264-1-joshua.hahnjy@gmail.com> References: <20260115211053.1406264-1-joshua.hahnjy@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.