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 52CA33AA1A8 for ; Tue, 31 Mar 2026 11:43:00 +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=1774957380; cv=none; b=joXEwh3bYVNmdbWp8HUPDFwj3vwrOgsHGCbvfQCbK8DAA5caFTrutowgYKhKsnfs6gsmciJIFga2/HZlK9ARpaTXJ5x3/WtWXMA8oM/yFjeWfwNDf07AH/HAWgZlje/kwgRMC4KOvxModv0O5/VbEUx7RM7bkT6q/NpsiU/oTQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774957380; c=relaxed/simple; bh=247pA96YIQXewVCf132JKie0YIN1hc4dvqlsqaYdnbo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=L3Vi1Zkmcg1YzimvoFiOQLxacFU16IxZGHcj241Lur4pPMvgJ9DKNtdTxtCTOOGCdV1hS5CBomEYbfpZQaM0FJjjWe5UJDGkvMJBE1SPzYgH2JFZOJkmY5h6sU+PQP96afD8PpTjd92uY69YcAZZg070LO+jme458kBKs/fBDVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mic0UrNq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mic0UrNq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2921CC19423; Tue, 31 Mar 2026 11:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774957380; bh=247pA96YIQXewVCf132JKie0YIN1hc4dvqlsqaYdnbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mic0UrNqqNfV55zdjXUqwQrg9u7c13NFfUwM6GjdKIItNtcBY3kuGQ1pAkLONlASN jORmduxma2Gej9GpBK7kjYfwebJhZlx7ATpi/8H9PHXaHmt/i0/gwTJwoZDxxt//YF g1Gs8AuEfEuva8i2Vk6qYgW2xG/GJSbuzgLMnH7HbrTz9EBzev1Y7bX3hyoZpdF61r ZG/ugAZG/0c67G0bXslH/6L71VmliJ3afB/cs/NWz9VzEbCDX88tTMSPVPTmzECcHM tcgs6sWfhYGxyefuFkY+29YPca/u0uodDzLNBl+hqh5HAiwo1ZR53p4WTkJA8nlbZq t+8vF8SHBIquQ== Date: Tue, 31 Mar 2026 14:42:54 +0300 From: Mike Rapoport To: David Carlier Cc: Andrew Morton , Peter Xu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/userfaultfd: fix wrong likely() hint on mmap_changing check in move_pages() Message-ID: References: <20260328170101.184163-1-devnexen@gmail.com> <20260328170101.184163-2-devnexen@gmail.com> 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-Disposition: inline In-Reply-To: <20260328170101.184163-2-devnexen@gmail.com> On Sat, Mar 28, 2026 at 05:01:01PM +0000, David Carlier wrote: > The mmap_changing check in move_pages() uses likely() but the condition > being true (concurrent mapping changes during UFFDIO_MOVE) is the > exceptional case, not the common one. All other mmap_changing checks in > the same file correctly use no branch hint or use unlikely(). > > Replace likely() with unlikely() to match the expected branch behavior. > > Signed-off-by: David Carlier Reviewed-by: Mike Rapoport (Microsoft) > --- > mm/userfaultfd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > -- Sincerely yours, Mike.