From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 250833E5EFF for ; Mon, 17 Aug 2026 10:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786961163; cv=none; b=lJnT5lkvyvGx9YZYGujPXGTsM/6KGkFyHAOXZMkfiGt/Vp1bCVsziHhjdIvEvzSjkiBqVGH0NxQFnppkwxXblRVmgN/gJhEiPpsGk2gMrX4o/tiX9GHsmNPU/ShUPJYGSpvoANErf6mF+43FZaGSTCMl4WddfeQpZiCFe6ryGO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786961163; c=relaxed/simple; bh=TF0pWG836qHiKIuCkWMIRIbrPz/JYh35IX3URyAqUzA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k+fDOXFuk4uVMZ7GG7KzzKf6ArUDS6DdPXu4UvhBeLqMJmTUezN8Dqu3FEbvLh7Mf27sPY1mowJ+Af3e7IGFRDew54J7CDlvB1Ln99zOaVRUBMi0dvm39xzce4gbuoVMFgztw3P72NskHky0LHE4PkTC4e55jdqwJ5L7R6v7oQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=LqTq8m4+; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="LqTq8m4+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description; bh=Dye5PQgJQveh6g84yI4yecG6KdWtAVDgLH/RuzA06Jo=; b=LqTq8m4+1H0oWNXS7MJfBcKDLo 0a5bvUFlqlNr/eoi9oGfRl2iDIWwJSpw20oy+ZKe3sWMju0NNtbALRHyShKeaBv69AOdot7Xlwkah H844ntbQgO1DocHd4Qlh2S/mgovYoSmFkqO8xPfzcEWsGYvZZJSWB/Zrz+dCqs2KbM+ymse7jOlOa ed1uSBr6eEs3zfXQsz+1K1k8OeM4J2HrqTdYK71cvjTEh1P3yRBBdTFGmT1N7VtxUHpozsDX1xmgO 3XL07acgUG8gFZTvTkX6jqkSb42yD1snGZnAhtmm+nWOd0HlPKWXN4R+Fc57/34nGjMcJOoTvBPgj +QyiLqpw==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wvuDd-0089GC-3A; Mon, 17 Aug 2026 10:05:26 +0000 Date: Mon, 17 Aug 2026 03:05:18 -0700 From: Breno Leitao To: Barry Song Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Youngjun Park , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , Hugh Dickins , Baolin Wang , Peter Xu , Johannes Weiner , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v2 3/3] mm: fail the fault on a malformed swap entry instead of retrying it Message-ID: References: <20260813-swap-v2-0-4a625ccabdae@debian.org> <20260813-swap-v2-3-4a625ccabdae@debian.org> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Debian-User: leitao On Mon, Aug 17, 2026 at 05:40:59PM +0800, Barry Song wrote: > > > Since you now return VM_FAULT_SIGBUS, the page fault should no > > > longer retry repeatedly. Do we still need patch 1/3, which adds the > > > rate-limited printk? > > > > Yes, I still think we need it, for a few reasons: > > > > 1) A different bug could just as easily trigger the same message > > flood again. > > 2) I don't see a case where flooding the log with this message > > would help. If it keeps firing, something else is already > > broken, and the repeated message itself adds nothing useful. > > 3) From a monitoring perspective, I'd guess 95% of our log > > messages should be rate limited anyway, and this one would fall into > > this category. > > > > You think this one shouldn't be ratelimited? > > I’m fine with rate limiting. I’m just curious: now that you return > `SIGBUS`, the PF won’t retry, so you shouldn’t get flooded with > printk messages, right? Oh, do_swap_page() is only one of the get_swap_device() call sites, and I am only returning SIGBUS from do_swap_page(). The other callers are unchanged, and whether any of them can loop on the same entry and flood needs a closer look. > Or are there still cases where returning SIGBUS won’t prevent the > printk flooding? For the path I hit, do_swap_page(), SIGBUS does prevent the flood. I cannot say the same for the other callers yet. That is also why I would like to keep patch 1 standing on its own: it is a cheap backstop no matter which caller is spinning, and it can go to stable independently of patches 2 and 3. Thanks for the solid questions, --breno