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 0EB4C246BCD for ; Fri, 27 Mar 2026 02:15:11 +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=1774577712; cv=none; b=ATKOnw3sPIwGxgePY4rwVRh0mfzEmD4ugFIHhCVU92GMNS8cFU+G9ZaeuyBiXl6aD1lDL3nnHFbH52WjFuHFoXT5Qou2d1AbkxLj+IgbEFXDssrPAIZNcW5DuX6AphgfxbDoxHazDF8Rm+mvUkAqvr0f81CAfrmelPi/cPbxYjQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774577712; c=relaxed/simple; bh=BHxhXRjS1tMbmoYRWWjDkH7nhTRR2Z3aOfr2xP1RU0U=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=YSEJjmzv7i/UzpXtGiFk/lL2d+bxaVsnjz3uYzSc26XABN6DacD47/0HIC+MjXDcP5G/5nIWBJcbn0Wxj9KnkBfeAF9oNvbx+MbqPHcK72dMAYZt9igEsDXQewfMIyRXgIfJEJXdRNrdo9Rr04Mb8hQ5YBinaD0PCpmKSOfK+xE= 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=w7Hi+7qA; 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="w7Hi+7qA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED527C116C6; Fri, 27 Mar 2026 02:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774577711; bh=BHxhXRjS1tMbmoYRWWjDkH7nhTRR2Z3aOfr2xP1RU0U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=w7Hi+7qArGNlgHXSRxaBfya7B2i7/oIuumZ/fcLv67qj7g4tbFZfOUR+D2UFlmcw0 wzywJ+r5MtK6tJjDFLxdZarWoa32yHo+ZmKlbM6s+rsNIr+FLHrPJD0FK57Ie/Kr7S 5jkStq8ANjWIPVfCLVbP9Yvt5MsY70yTZ/RwI+PQ= Date: Thu, 26 Mar 2026 19:15:10 -0700 From: Andrew Morton To: Axel Rasmussen Cc: Yuanchu Xie , Arnd Bergmann , Arnd Bergmann , Johannes Weiner , Wei Xu , "David Hildenbrand (Red Hat)" , Michal Hocko , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Baolin Wang , Kairui Song , Davidlohr Bueso , Koichiro Den , Jiayuan Chen , Bertrand Wlodarczyk , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmscan: avoid false-positive -Wuninitialized warning Message-Id: <20260326191510.31210c752099a708fe445d80@linux-foundation.org> In-Reply-To: References: <20260213123902.3466040-1-arnd@kernel.org> <20260213085842.0654f70a73ec05d88908ec25@linux-foundation.org> <20260213092336.c2b0f2d1be17f1e2e9856f11@linux-foundation.org> 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 Tue, 17 Feb 2026 13:22:01 -0800 Axel Rasmussen wrote: > > > Let's see what the MGLRU maintainers have to say. > > > > I went over the various cases of read_ctrl_pos and couldn't find > > anything wrong (let me know if I'm mistaken), so this seems like a > > mild compiler bug we're trying to work around. Given it's one single > > version of gcc, I'm a fan of the simple `struct ctrl_pos sp, pv = {};` > > with a comment. > > Agreed, that simpler change with a comment seems better to me. > > I don't necessarily hate the refactor to split up the single / > aggregate cases, but if we were going to do that I'd probably have > aggregate_ctrl_pos call read_ctrl_pos to avoid duplicating the code, > and I'd want to consider marking read_ctrl_pos inline. > > But, it does seem like a large delta just to work around a false > positive warning. The simpler change would be easier to backport to > stable too for example. So on balance I'd prefer that. Thanks. Did anyone send a v2? If so, I misplaced it!