From: Brian Geffon <bgeffon@google.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>,
David Stevens <stevensd@google.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 1/3] zram: use u32 for entry ac_time tracking
Date: Mon, 15 Dec 2025 20:17:10 -0500 [thread overview]
Message-ID: <CADyq12wk_Ac-iinF=LEkzrwcu5-8FnVBXODX6GC4BjxxF2TBvQ@mail.gmail.com> (raw)
In-Reply-To: <gqkugg2q3hafwikx2wvnsh6oa44ifbtuskmigsqbrkaztjwj4i@33n5p55zq3nz>
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On Mon, Dec 15, 2025, 19:59 Sergey Senozhatsky <senozhatsky@chromium.org>
wrote:
> On (25/12/15 17:31), Brian Geffon wrote:
> [..]
> > > struct zram_table_entry {
> > > unsigned long handle;
> > > - unsigned long flags;
> > > + union {
> > > + unsigned long __lock;
> > > + struct attr {
> > > + u32 flags;
> > > #ifdef CONFIG_ZRAM_TRACK_ENTRY_ACTIME
> > > - ktime_t ac_time;
> > > + u32 ac_time;
> > > #endif
> >
> > Why not just always enable CONFIG_ZRAM_TRACK_ENTRY_ACTIME now that it
> > doesn't consume any additional space?
>
> It's "free" only on x64. On 32bit systems the removal of
> ZRAM_TRACK_ENTRY_ACTIME will unconditionally add 4 bytes
> per zram_table_entry.
>
Yes thanks true. Sounds good to me.
> > Also, why can't we do this with a single unsigned long flags
> > as before and have a simple method that isolates and casts the
> > lower 32bits as a u32?
>
> There are no upper and lower 32 bits in unsigned long on 32bit systems.
>
[-- Attachment #2: Type: text/html, Size: 1905 bytes --]
prev parent reply other threads:[~2025-12-16 1:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 5:47 Sergey Senozhatsky
2025-12-15 5:47 ` [PATCH 2/3] zram: rename internal slot API Sergey Senozhatsky
2025-12-15 5:47 ` [PATCH 3/3] zram: trivial fix of recompress_slot() coding styles Sergey Senozhatsky
2025-12-15 22:31 ` [PATCH 1/3] zram: use u32 for entry ac_time tracking Brian Geffon
2025-12-16 0:59 ` Sergey Senozhatsky
2025-12-16 1:17 ` Brian Geffon [this message]
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='CADyq12wk_Ac-iinF=LEkzrwcu5-8FnVBXODX6GC4BjxxF2TBvQ@mail.gmail.com' \
--to=bgeffon@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=stevensd@google.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