[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <040ed7a7-3f4d-dab7-5a49-1cd9933c5445@redhat.com>
Date: Tue, 31 Jan 2023 09:32:27 +0100
From: David Hildenbrand <david@...hat.com>
To: Jens Axboe <axboe@...nel.dk>, David Howells <dhowells@...hat.com>,
John Hubbard <jhubbard@...dia.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
Jason Gunthorpe <jgg@...dia.com>,
Logan Gunthorpe <logang@...tatee.com>,
Jeff Layton <jlayton@...nel.org>, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] iov_iter: Improve page extraction (pin or just list)
On 30.01.23 23:15, Jens Axboe wrote:
> On 1/30/23 3:12 PM, David Howells wrote:
>> John Hubbard <jhubbard@...dia.com> wrote:
>>
>>> This is something that we say when adding pin_user_pages_fast(),
>>> yes. I doubt that I can quickly find the email thread, but we
>>> measured it and weren't immediately able to come up with a way
>>> to make it faster.
>>
>> percpu counters maybe - add them up at the point of viewing?
>
> They are percpu, see my last email. But for every 108 changes (on
> my system), they will do two atomic_long_adds(). So not very
> useful for anything but low frequency modifications.
>
Can we just treat the whole acquired/released accounting as a debug
mechanism to detect missing releases and do it only for debug kernels?
The pcpu counter is an s8, so we have to flush on a regular basis and
cannot really defer it any longer ... but I'm curious if it would be of
any help to only have a single PINNED counter that goes into both
directions (inc/dec on pin/release), to reduce the flushing.
Of course, once we pin/release more than ~108 pages in one go or we
switch CPUs frequently it won't be that much of a help ...
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists