linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Yuwen Chen <ywen.chen@foxmail.com>,
	Richard Chang <richardycc@google.com>,
	 Brian Geffon <bgeffon@google.com>,
	Fengyu Lian <licayy@outlook.com>,
	linux-kernel@vger.kernel.org,  linux-mm@kvack.org,
	linux-block@vger.kernel.org,
	 Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCHv2 1/4] zram: introduce writeback bio batching support
Date: Fri, 14 Nov 2025 12:08:08 +0900	[thread overview]
Message-ID: <uzmauds6u53bauvwcycu4uphsrb4fg7rvm2b5x6uqyukqq4wwp@vhugu2qv3uaa> (raw)
In-Reply-To: <rjowf2hdk7pkmqpslj6jaqm6y4mhvr726dxpjyz7jtcjixv3hi@jyah654foky4>

On (25/11/14 10:53), Sergey Senozhatsky wrote:
> [..]
> > > +struct zram_wb_req {
> > > +	unsigned long blk_idx;
> > > +	struct page *page;
> > >  	struct zram_pp_slot *pps;
> > >  	struct bio_vec bio_vec;
> > >  	struct bio bio;
> > > -	int ret = 0, err;
> > > +
> > > +	struct list_head entry;
> > > +};
> > 
> > How about moving structure definition to the upper part of the C file?
> > Not only readability to put together data types but also better diff
> > for reviewer to know what we changed in this patch.
> 
> This still needs to be under #ifdef CONFIG_ZRAM_WRITEBACK so readability
> is not significantly better.  Do you still prefer moving it up?

My intention was to keep structs definitions together with the static
functions that use them (which are under big #ifdef CONFIG_ZRAM_WRITEBACK
block).  So that CONFIG_ZRAM_WRITEBACK parts stay in one place and are not
scattered across the file.


  reply	other threads:[~2025-11-14  3:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  8:53 [PATCHv2 0/4] zram: introduce writeback bio batching Sergey Senozhatsky
2025-11-13  8:53 ` [PATCHv2 1/4] zram: introduce writeback bio batching support Sergey Senozhatsky
2025-11-13 23:45   ` Minchan Kim
2025-11-14  1:53     ` Sergey Senozhatsky
2025-11-14  3:08       ` Sergey Senozhatsky [this message]
2025-11-14 19:14       ` Minchan Kim
2025-11-15  2:25         ` Sergey Senozhatsky
2025-11-15  3:42         ` Sergey Senozhatsky
2025-11-13  8:54 ` [PATCHv2 2/4] zram: add writeback batch size device attr Sergey Senozhatsky
2025-11-13  8:54 ` [PATCHv2 3/4] zram: take write lock in wb limit store handlers Sergey Senozhatsky
2025-11-13  8:54 ` [PATCHv2 4/4] zram: drop wb_limit_lock Sergey Senozhatsky

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=uzmauds6u53bauvwcycu4uphsrb4fg7rvm2b5x6uqyukqq4wwp@vhugu2qv3uaa \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=licayy@outlook.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    --cc=ywen.chen@foxmail.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