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: <d1937343-5fc3-4450-b31a-d45b6f5cfc16@amd.com>
Date: Tue, 3 Jun 2025 17:55:18 +0200
From: Christian König <christian.koenig@....com>
To: Christoph Hellwig <hch@...radead.org>
Cc: wangtao <tao.wangtao@...or.com>, sumit.semwal@...aro.org,
 kraxel@...hat.com, vivek.kasireddy@...el.com, viro@...iv.linux.org.uk,
 brauner@...nel.org, hughd@...gle.com, akpm@...ux-foundation.org,
 amir73il@...il.com, benjamin.gaignard@...labora.com, Brian.Starkey@....com,
 jstultz@...gle.com, tjmercier@...gle.com, jack@...e.cz,
 baolin.wang@...ux.alibaba.com, linux-media@...r.kernel.org,
 dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
 linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-mm@...ck.org, bintian.wang@...or.com, yipengxiang@...or.com,
 liulu.liu@...or.com, feng.han@...or.com
Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

On 6/3/25 16:28, Christoph Hellwig wrote:
> On Tue, Jun 03, 2025 at 04:18:22PM +0200, Christian König wrote:
>>> Does it matter compared to the I/O in this case?
>>
>> It unfortunately does, see the numbers on patch 3 and 4.
> 
> That's kinda weird.  Why does the page table lookup tage so much
> time compared to normal I/O?

I have absolutely no idea. It's rather surprising for me as well.

The user seems to have a rather slow CPU paired with fast I/O, but it still looks rather fishy to me.

Additional to that allocating memory through memfd_create() is *much* slower on that box than through dma-buf-heaps (which basically just uses GFP and an array).

We have seen something similar with customers systems which we couldn't explain so far.

>> My question is rather if it's ok to call f_op->write_iter() and 
>> f_op->read_iter() with pages allocated by alloc_pages(), e.g.
>> where drivers potentially ignore the page count and just re-use pages
>> as they like?
> 
> read_iter and write_iter with ITER_BVEC just use the pages as source
> and destination of the I/O.  They must not touch the refcounts or
> do anything fancy with them.  Various places in the kernel rely on
> that.

Perfect, thanks for that info.

Regards,
Christian.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ