From: Dan Carpenter <dan.carpenter@linaro.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv5 3/7] zram: rework recompress target selection strategy
Date: Tue, 1 Oct 2024 10:42:58 +0300 [thread overview]
Message-ID: <61e752c5-ed1b-4b9b-8bdc-0562d2fbc828@stanley.mountain> (raw)
In-Reply-To: <20240917021020.883356-4-senozhatsky@chromium.org>
On Tue, Sep 17, 2024 at 11:09:08AM +0900, Sergey Senozhatsky wrote:
> +static struct zram_pp_slot *select_pp_slot(struct zram_pp_ctl *ctl)
> +{
> + struct zram_pp_slot *pps = NULL;
> + s32 idx = NUM_PP_BUCKETS - 1;
> +
> + /* The higher the bucket id the more optimal slot post-processing is */
> + while (idx > 0) {
Why is this not idx >= 0? Why skip the first bucket?
regards,
dan carpenter
> + pps = list_first_entry_or_null(&ctl->pp_buckets[idx],
> + struct zram_pp_slot,
> + entry);
> + if (pps)
> + break;
> +
> + idx--;
> + }
> + return pps;
> +}
next prev parent reply other threads:[~2024-10-01 7:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 2:09 [PATCHv5 0/7] zram: optimal post-processing target selection Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 1/7] zram: introduce ZRAM_PP_SLOT flag Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 2/7] zram: permit only one post-processing operation at a time Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 3/7] zram: rework recompress target selection strategy Sergey Senozhatsky
2024-10-01 7:42 ` Dan Carpenter [this message]
2024-10-01 8:40 ` Sergey Senozhatsky
2024-10-01 9:16 ` Dan Carpenter
2024-09-17 2:09 ` [PATCHv5 4/7] zram: rework writeback " Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 5/7] zram: do not mark idle slots that cannot be idle Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 6/7] zram: reshuffle zram_free_page() flags operations Sergey Senozhatsky
2024-09-17 2:09 ` [PATCHv5 7/7] zram: remove UNDER_WB and simplify writeback 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=61e752c5-ed1b-4b9b-8bdc-0562d2fbc828@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
/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®