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 2974230B50D for ; Mon, 23 Mar 2026 19:05:20 +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=1774292721; cv=none; b=pHx1oTgOsKonPmLDRL1fIcBHo0+yWAvJa2QqqmaTPb9MFBx5JlLVxLVZO1r7A4v/7Kf0XsplduJ0QgqgXIghsoFnST6LWMrZ2qTnQhBTfC1zddmmv/yEcyaJAi8slQGalDEIDp9f8LddvnLR9ROlYeVruGY2+Qiaq1LelgVOFns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774292721; c=relaxed/simple; bh=pnvnHAkGJX75rQA83KkPyOPaJZ101MU2d5ZMOppOD4w=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=iVFhMpWAvuDuVk275iHXqdzuTSpdi5iAesS5vZYhKg5OsoPb3NxGyMgZ+vSPgiiTPma9ZXJQcVPQ3h9pfvlyfbQ27ov0iOXDXwYY84UZdfom+WQ/l0mT5/xJT2ZgMI/sXgBvyYpuTvN3Xyb3rEDeSGVvhgO44wFSOIzTBnUUmCw= 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=A+XSB7kN; 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="A+XSB7kN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2886AC2BC87; Mon, 23 Mar 2026 19:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774292720; bh=pnvnHAkGJX75rQA83KkPyOPaJZ101MU2d5ZMOppOD4w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A+XSB7kNhnNco2ImsJ86BPp+eMjLFpTMmqbEwgXmJY+k/b+enGzv+Dy+F5iPW2LnL i6o8+aSFGYYxoC0cPtSQovfuDR+YtFXTMtcIyqE/x/GKMT3IU86CKcB2hPrjJpaPug K7+2i4NMzNFs2J8AOHtep2nf0bLFQ343sG83OXGY= Date: Mon, 23 Mar 2026 12:05:19 -0700 From: Andrew Morton To: David Rientjes Cc: Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] mm, page_alloc: reintroduce page allocation stall warning Message-Id: <20260323120519.7c827910a14ce67f45cd4251@linux-foundation.org> In-Reply-To: <30945cc3-9c4d-94bb-e7e7-dde71483800c@google.com> References: <30945cc3-9c4d-94bb-e7e7-dde71483800c@google.com> 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 Sat, 21 Mar 2026 20:03:16 -0700 (PDT) David Rientjes wrote: > Previously, we had warnings when a single page allocation took longer > than reasonably expected. This was introduced in commit 63f53dea0c98 > ("mm: warn about allocations which stall for too long"). > > The warning was subsequently reverted in commit 400e22499dd9 ("mm: don't > warn about allocations which stall for too long") but for reasons > unrelated to the warning itself. > > Page allocation stalls in excess of 10 seconds are always useful to debug > because they can result in severe userspace unresponsiveness. Adding > this artifact can be used to correlate with userspace going out to lunch > and to understand the state of memory at the time. > > There should be a reasonable expectation that this warning will never > trigger given it is very passive, it starts with a 10 second floor to > begin with. If it does trigger, this reveals an issue that should be > fixed: a single page allocation should never loop for more than 10 > seconds without oom killing to make memory available. > > Unlike the original implementation, this implementation only reports > stalls that are at least a second longer than the longest stall reported > thus far. AI review: https://sashiko.dev/#/patchset/30945cc3-9c4d-94bb-e7e7-dde71483800c@google.com The warn_alloc_show_mem() inside spin_lock_irqsave() does sound problematic.