From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (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 1B60335CB87 for ; Thu, 19 Mar 2026 03:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773890784; cv=none; b=MEstWKS1utcwTTa2pMiwmS8OdHT+F0lG7V28EtD91Fs2hiNp7DY6BsP/39negVVq3VWS82ULBnh9iobqX8Pmz41ciT33xvas/nJ9mFkpzj2AwQG9hJOloSxkW9vwPVPaBCJ0oviWZdhGAIdPXrG0fR801xiJvLold84JXhbRDNc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773890784; c=relaxed/simple; bh=Ebo9PtlbWeoE+/6rq/1gGW3f2+cCauvrPiBtK4PVP3o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fgxS4oPQkqHHdg5Iw9iw+OkjIG0ZQy799nxof899NzveOGF7iHrljU2L7aWetdWEy9JMrMDWG8CeJIA4eEErZH2x8s+cOtods/ed06FRSFfnl90d6St5AaRpt0j0zzVHSPVAj9aMMdUUWrTxrGSLSqKrL+ouAO0WCIno060Siok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=boIQgSe/; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="boIQgSe/" Message-ID: <4b2182c1-7984-4d05-ba9c-67046ed01b4b@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1773890781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X3hFeGLplj5gcJNH+nPtLsdbfdCmp+ODkITTDP1nWX8=; b=boIQgSe/hrj3e8DqA/zupaiLd9heEa5O8FFfH8iFtSSVrRUAmBlnINl5UvX78cLMKw6caQ Y+25V8khtUFQCv8QebsuSoxEzdgEM29ZOIAk16kRpx0ZqWNjlbONkQeVGczFDQUpHmWlIV EEg86mBt0Zl4oOVszQuYslzQpAeMlRs= Date: Thu, 19 Mar 2026 11:26:11 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 2/8] mm/huge: avoid big else branch in zap_huge_pmd() To: "Lorenzo Stoakes (Oracle)" Cc: David Hildenbrand , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton References: <10be43ead023e9f65333bcaf4064d9d197111405.1773865827.git.ljs@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qi Zheng In-Reply-To: <10be43ead023e9f65333bcaf4064d9d197111405.1773865827.git.ljs@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 3/19/26 4:39 AM, Lorenzo Stoakes (Oracle) wrote: > We don't need to have an extra level of indentation, we can simply exit > early in the first two branches. > > Signed-off-by: Lorenzo Stoakes (Oracle) > --- > mm/huge_memory.c | 87 +++++++++++++++++++++++++----------------------- > 1 file changed, 45 insertions(+), 42 deletions(-) > The code here isn't too complex, otherwise we can introduce the function like do_zap_pte_range(). Acked-by: Qi Zheng