All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@kernel.org>
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: use copy_page for full page copy
Date: Thu, 13 Jun 2024 20:58:55 +0800	[thread overview]
Message-ID: <ZmrtD5NsKcDkY4Ll@xhacker> (raw)
In-Reply-To: <20240613031731.GB479513@google.com>

On Thu, Jun 13, 2024 at 12:17:31PM +0900, Sergey Senozhatsky wrote:
> On (24/06/13 08:04), Jisheng Zhang wrote:
> > commit 42e99bd975fd ("zram: optimize memory operations with
> > clear_page()/copy_page()") optimize page copy/clean operations, but
> > then commit d72e9a7a93e4 ("zram: do not use copy_page with non-page
> > aligned address") removes the optimization because there's memory
> > corruption at that time, the reason was well explained. But after
> > commit 1f7319c74275 ("zram: partial IO refactoring"), partial IO uses
> > alloc_page() instead of kmalloc to allocate a page, so we can bring
> > back the optimization.
> > 
> > commit 80ba4caf8ba9 ("zram: use copy_page for full page copy") brings
> > back partial optimization, missed one point in zram_write_page().
> > optimize the full page copying in zram_write_page() with copy_page()
> 
> Is copy_page() really more optimal than memcpy(PAGE_SIZE)?

I think yes copy_page performs better than memcpy(PAGE_SIZE)
commit afb2d666d025 ("zsmalloc: use copy_page for full page copy")
also shows the result.

  reply	other threads:[~2024-06-13 13:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13  0:04 [PATCH] zram: use copy_page for full page copy Jisheng Zhang
2024-06-13  3:17 ` Sergey Senozhatsky
2024-06-13 12:58   ` Jisheng Zhang [this message]
2024-06-14  5:25 ` Christoph Hellwig
2024-06-14  5:31   ` Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2023-10-07  7:05 Mark-PK Tsai
2023-10-07  7:05 ` Mark-PK Tsai
2023-10-08  4:38 ` Sergey Senozhatsky
2023-10-08  4:38   ` Sergey Senozhatsky
2024-02-05  6:43   ` Mark-PK Tsai (蔡沛剛)
2024-02-05  6:43     ` Mark-PK Tsai (蔡沛剛)
2024-02-05  6:48     ` Sergey Senozhatsky
2024-02-05  6:48       ` Sergey Senozhatsky
2024-02-05  6:50 ` Sergey Senozhatsky
2024-02-05  6:50   ` 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=ZmrtD5NsKcDkY4Ll@xhacker \
    --to=jszhang@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.