lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mqv5dquv3qud3dqmyxzf2kvq7mydjszg6rja2o2w2oa46uvjm2@mrazizdfg73r>
Date: Wed, 29 Jan 2025 20:45:46 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Kenny Cheng <chao.shun.cheng.tw@...il.com>
Cc: minchan@...nel.org, senozhatsky@...omium.org, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, c.s.cheng@...ltek.com, Andrew Morton <akpm@...ux-foundation.org>, 
	Yosry Ahmed <yosry.ahmed@...ux.dev>
Subject: Re: [PATCH v2] zsmalloc: Fix address alignment in zspage for
 performance improvement

Cc-ing Andrew and Yosry

On (25/01/29 16:28), Kenny Cheng wrote:
> The zspage consists of multiple objects, each containing a "link struct"
> to connect to the next object. The "link struct" is placed at the
> beginning of each object. On a 32-bit system, the size of the "link
> struct" is 4 bytes, which means the address returned by `zs_map_object`
> is always 4-byte aligned.

Sorry, you picked a rather unlucky time to patch zsmalloc, as it
goes through some intrusive changes.  We need to stabilize those
changes first.

> For better performance, zram compression/decompression is offloaded to
> hardware designed by the IC vendor. For example, Realtek's hardware
> requires 16-byte alignment. However, due to the 4-byte alignment,
> a `memcpy` operation is needed to move data from the 4-byte aligned
> address to the 16-byte aligned address, which negatively impacts zram
> performance.

Hmm, I don't know.  If we change zsmalloc to make some H/W happy, how
do we make sure that something that is good for Realtek is not "bad"
for some other H/W?

I'm very unsure about having "vendor-specific" (by the way, is that
out-of-tree compression/decompression driver?) changes in zsmalloc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ