mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alexandre Ghiti <alexghiti@meta.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Alexandre Ghiti <alex@ghiti.fr>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-block@vger.kernel.org, cgroups@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	david@kernel.org, Johannes Weiner <hannes@cmpxchg.org>,
	Yosry Ahmed <yosry@kernel.org>, Nhat Pham <nphamcs@gmail.com>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
	Josef Bacik <josef@toxicpanda.com>, Chris Li <chrisl@kernel.org>,
	Kairui Song <kasong@tencent.com>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Baoquan He <baoquan.he@linux.dev>, Barry Song <baohua@kernel.org>,
	Youngjun Park <youngjun.park@lge.com>
Subject: Re: [RFC PATCH 1/4] block: do not issue background swap bios as root
Date: Mon, 5 Oct 2026 01:23:22 -0700	[thread overview]
Message-ID: <asNeenTiIme0kzI6@infradead.org> (raw)
In-Reply-To: <CAEmasaX-6v_EpwAxHtnhA5SXk=jGW8+Lm4m8zAC=+f0yXmiCxw@mail.gmail.com>

On Tue, Sep 29, 2026 at 11:16:03AM +0200, Alexandre Ghiti wrote:
> > >
> > > Such a bio cannot simply drop REQ_SWAP: dm-crypt and dm-thin rely on it
> > > for limit_swap_bios, which caps in-flight swap bios to avoid a memory
> > > deadlock, see commit a666e5c05e7c ("dm: fix deadlock when swapping to
> > > encrypted device").
> >
> > Is that true?  REQ_BACKGROUND very much implies the I/O can the throttled
> > and thus better not be foreground paging, and thus the caller should be
> > able to tolerate a failure.
> >
> 
> Yes, I agree, zswap writebacks are only best effort and in case of
> failure, the compressed entry still lives. I don't see how
> REQ_BACKGROUND could be an issue there?

The issue is that by definition it doesn't need REQ_SWAP then.

Then again the whole concept of REQ_SWAP looks sketchy to me, non-swap
paging can be just as important for forward progress, so if a driver
needs it, it has other issues anyway.

  reply	other threads:[~2026-10-05  8:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  8:18 [RFC PATCH 0/4] mm/zswap: make shrinker writeback work with iocost Alexandre Ghiti
2026-09-28  8:18 ` [RFC PATCH 1/4] block: do not issue background swap bios as root Alexandre Ghiti
2026-09-28  9:44   ` Christoph Hellwig
2026-09-29  9:16     ` Alexandre Ghiti
2026-10-05  8:23       ` Christoph Hellwig [this message]
2026-09-28  8:18 ` [RFC PATCH 2/4] mm/zswap: turn shrink_memcg_cb()'s argument into a flags word Alexandre Ghiti
2026-09-28  8:18 ` [RFC PATCH 3/4] mm/zswap: allow writeback to be throttled by the cgroup IO controllers Alexandre Ghiti
2026-09-28  8:18 ` [RFC PATCH 4/4] mm/zswap: move reclaim-driven writeback to a kworker Alexandre Ghiti
2026-09-29 13:42   ` Nhat Pham
2026-09-30  8:57     ` Alexandre Ghiti
2026-09-29 13:14 ` [RFC PATCH 0/4] mm/zswap: make shrinker writeback work with iocost Nhat Pham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=asNeenTiIme0kzI6@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=alexghiti@meta.com \
    --cc=axboe@kernel.dk \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=cgroups@vger.kernel.org \
    --cc=chengming.zhou@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=josef@toxicpanda.com \
    --cc=kasong@tencent.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=tj@kernel.org \
    --cc=yosry@kernel.org \
    --cc=youngjun.park@lge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®