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 732342701B8 for ; Fri, 20 Mar 2026 03:09:18 +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=1773976158; cv=none; b=fXy3HxEUOMpbrOczcRNsFeF+/yCVBpbPClqXxXUcOy4TOX9yjCQpjLjutpuaU6QzNQm2kNpJ8x2GAUsKleYqM19kwklIaQdo7iyRE/s+07FKIxpYlU3zetABfAnTH3AfCYhALUT1FkPwuhdEJ1hggy3NYi24RHD3l/k4ppHD7Ms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773976158; c=relaxed/simple; bh=1nu7xvIa4iZYd5WAcCJ2dkMWrSUCOquDX2FpVhwFabo=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=UTOhnNm4kE0kMo/PjHVCTg4GU/pJULZh6iLLH7Pu9hK2Uh+4suXZ0mh8W/KueUw3ovl3+Xl7Nqm/57tFmbKvBLYSaoeQGuhlXiHSLIsWJKgflV1KSISDGxtfU3xRIuuMHtknez43xK7+yCQ/DHhrRwP4NN4sjJiwtoHAi8KucSo= 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=jsCZiUGQ; 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="jsCZiUGQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FCA4C19425; Fri, 20 Mar 2026 03:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1773976158; bh=1nu7xvIa4iZYd5WAcCJ2dkMWrSUCOquDX2FpVhwFabo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jsCZiUGQbl3PXFkIm5aVjXOcmNQcEEgzZz0BLqsHZxnNno57YJfUMMb1KfA3Ry8i7 +J54G+06TkQ10EnqWPS4qgAPg84lFMGsCRxcsC/PmmV/M0xJz+6dByICVFF+2OtL+C Y11BWcJZi7cvkdrALT4CDzVBtscsxVFiYBJB2D00= Date: Thu, 19 Mar 2026 20:09:17 -0700 From: Andrew Morton 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, Roman Gushchin Subject: Re: [PATCH v2 0/9] mm/huge_memory: refactor zap_huge_pmd() Message-Id: <20260319200917.ce345a369d035050b6329ac5@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.8.0beta1 (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, 19 Mar 2026 13:00:06 +0000 "Lorenzo Stoakes (Oracle)" wrote: > The zap_huge_pmd() function is overly complicated, clean it up and also add > an assert in the case that we encounter a buggy PMD entry that doesn't > match expectations. > > This is motivated by a bug discovered [0] where the PMD entry was none of: > > * A non-DAX, PFN or mixed map. > * The huge zero folio > * A present PMD entry > * A softleaf entry > > In zap_huge_pmd(), but due to the bug we manged to reach this code. > > It is useful to explicitly call this out rather than have an arbitrary NULL > pointer dereference happen, which also improves understanding of what's > going on. > > [0]:https://lore.kernel.org/all/6b3d7ad7-49e1-407a-903d-3103704160d8@lucifer.local/ AI review has questions, which I assume you've seen https://sashiko.dev/#/patchset/cover.1773924928.git.ljs%40kernel.org This isn't going well from a workflow POV. I merge stuff (this was v2) then half a day later a bunch of potential issues are identified. If these reviews are useful (they seem to be, enough) then I guess I'll need to further increase the lag between seeing-it and merging-it. But if there's a 2-day lag before I get onto a series and I'm the first to look at Sashiko then that won't help. So it needs to be something like - series is posted - 24 hours pass - submitter takes a look at the AI review, maybe prepares a new series. - 24 hours pass - rinse, repeat - it gets merged, hopefully with some Reviewed-by"s. Not unreasonable, but it requires that submitter be made aware of Sashiko's comments. At present that's via me being tiresome. Anyway, early days. I'm thinking that an emailed reply-to-all from Sashiko will help. Much hinges on how useful submitters find these questions to be - something which I'm paying close attention to...