From: Wenchao Hao <haowenchao22@gmail.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] zram: cleanup in zram_read_from_zspool()
Date: Thu, 16 Jan 2025 10:11:42 +0800 [thread overview]
Message-ID: <5cc90e64-4f17-487a-9ab6-691de00c4cb8@gmail.com> (raw)
In-Reply-To: <iiiqdmxebni4sfal7rguy4me24tgmzym2v4oz5hzjv624vavr6@kida3yjmoecs>
On 2025/1/16 8:41, Sergey Senozhatsky wrote:
> On (25/01/15 22:55), Wenchao Hao wrote:
>> @@ -1561,11 +1561,6 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page,
>>
>> size = zram_get_obj_size(zram, index);
>>
>> - if (size != PAGE_SIZE) {
>> - prio = zram_get_priority(zram, index);
>> - zstrm = zcomp_stream_get(zram->comps[prio]);
>> - }
>> -
>> src = zs_map_object(zram->mem_pool, handle, ZS_MM_RO);
>> if (size == PAGE_SIZE) {
>> dst = kmap_local_page(page);
>> @@ -1573,6 +1568,9 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page,
>> kunmap_local(dst);
>> ret = 0;
>> } else {
>> + prio = zram_get_priority(zram, index);
>> + zstrm = zcomp_stream_get(zram->comps[prio]);
>> +
>> dst = kmap_local_page(page);
>> ret = zcomp_decompress(zram->comps[prio], zstrm,
>> src, size, dst);
>
> I think you are looking at some old code base (or maybe vanilla kernel),
> that function does not look like this in the current mm tree (or linux-next).
Yes, it's from https://github.com/torvalds/linux. Sorry I did not examine the
latest code, please ignore this thread.
Thanks.
prev parent reply other threads:[~2025-01-16 2:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 14:55 [PATCH] zram: cleanup in zram_read_from_zspool() Wenchao Hao
2025-01-16 0:41 ` Sergey Senozhatsky
2025-01-16 2:11 ` Wenchao Hao [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=5cc90e64-4f17-487a-9ab6-691de00c4cb8@gmail.com \
--to=haowenchao22@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.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