From: YoungJun Park <youngjun.park@lge.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, chrisl@kernel.org,
kasong@tencent.com, shikemeng@huaweicloud.com, nphamcs@gmail.com,
bhe@redhat.com, baohua@kernel.org
Subject: Re: [RFC PATCH 1/2] mm: swap: add SWAP_FLAG_SKIP_ZERO_CHECK to skip zero-filled page check
Date: Thu, 21 May 2026 15:46:37 +0900 [thread overview]
Message-ID: <ag6qTZulqiyukHAj@yjaykim-PowerEdge-T330> (raw)
In-Reply-To: <agwq6UY_4E9VjMMb@infradead.org>
On Tue, May 19, 2026 at 02:18:33AM -0700, Christoph Hellwig wrote:
> On Tue, May 19, 2026 at 04:08:35PM +0900, YoungJun Park wrote:
> > On Mon, May 18, 2026 at 11:30:52PM -0700, Christoph Hellwig wrote:
> >
> > Hi Christoph!
> >
> > > Nothing in this patch ever sets the new flag. And I'd rather not
> >
> > I defined a new flag that can be set at swapon timing. Is your concern
> > that there is no mention of the user-space flag setting part?
>
> Heh. My main concert was that I assumed it's a kernel-only flag as
> SWAP_FLAG_* aren't defined in a uapi header. But now that I know
> that they are user passed flag, my concern is that this is not something
> that should be exposed to the user because it is a depply internal
> implementation detail.
>
> >
> > > add new weird bdev hooks for zram when we really need to consolidate
> > > the compressed swap logic in the core swap code.
> >
> > Are you mentioning we consolidate the same data pattern logic (including
> > compressed swap) into the core swap code?
>
> That is the plan based on my understanding of the LSF/MM session.
>
> > I am curious about what direction you have in mind. I can think of three
> > possible approaches.
> >
> > - Handle it in individual devices
> >
> > Can be optimized for each device. Currently, the swap layer
> > handles zero pages but not same data patterns, causing a mismatch. My
> > patch aims to resolve this. If we prefer this direction, we could even
> > remove the zero page check from the swap layer and let individual swap
> > devices handle it.
>
> I don't think devices should care about this at all. compression and
> dedup is core functionality that does not depend on the underlying
> device.
>
> > I wonder which direction you are considering.
>
> Please look at all the ongoing discussions on the linux-mm list.
I submitted this patch from the perspective of optimizing the current state,
but I see that it might not align with the future direction.
Thank you for the reply and clarification.
Best regards,
Youngjun Park
next prev parent reply other threads:[~2026-05-21 6:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 7:34 [RFC PATCH 0/2] mm: swap: allow per-device skipping of zero-filled page check Youngjun Park
2026-05-18 7:34 ` [RFC PATCH 1/2] mm: swap: add SWAP_FLAG_SKIP_ZERO_CHECK to skip " Youngjun Park
2026-05-19 6:30 ` Christoph Hellwig
2026-05-19 7:08 ` YoungJun Park
2026-05-19 9:18 ` Christoph Hellwig
2026-05-21 6:46 ` YoungJun Park [this message]
2026-05-18 7:34 ` [RFC PATCH 2/2] mm: swap: do not allocate zero_bitmap if zero check is skipped Youngjun Park
2026-05-19 10:16 ` [RFC PATCH 0/2] mm: swap: allow per-device skipping of zero-filled page check Usama Arif
2026-05-21 6:57 ` YoungJun Park
2026-05-31 18:48 ` Kairui Song
2026-06-01 2:05 ` YoungJun Park
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=ag6qTZulqiyukHAj@yjaykim-PowerEdge-T330 \
--to=youngjun.park@lge.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=hch@infradead.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=shikemeng@huaweicloud.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