Re: [RFC PATCH 5/6] zsmalloc: introduce handle mapping API
From: Sergey Senozhatsky
Date: Tue Jan 28 2025 - 04:39:39 EST
On (25/01/28 14:29), Sergey Senozhatsky wrote:
> Maybe copy-in is just an okay thing to do. Let me try to measure.
Naaah, not really okay. On our memory-pressure test (4GB device, 4
CPUs) that kmap_local thingy appears to save approx 6GB of memcpy().
CPY stats: 734954 1102903168 4926116 6566654656
There were 734954 cases when we memcpy() [object spans two pages] with
accumulated size of 1102903168 bytes, and 4926116 cases when we took
a shortcut via kmap_local and avoided memcpy(), with accumulated size
of 6566654656 bytes.
In both cases I counted only RO direction for map, and WO direction
for unmap.