[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201004141556.GO3421308@ZenIV.linux.org.uk>
Date: Sun, 4 Oct 2020 15:15:56 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Matthew Wilcox <willy@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Marc Zyngier <maz@...nel.org>
Subject: Re: [RFC][PATCHSET] epoll cleanups
On Sun, Oct 04, 2020 at 01:13:29PM +0100, Matthew Wilcox wrote:
> Have you considered just storing a pointer to each struct file in an
> epoll set in an XArray? Linked lists suck for modern CPUs, and there'd
> be no need to store any additional data in each struct file. Using
> xa_alloc() to store the pointer and throw away the index the pointer
> got stored at would leave you with something approximating a singly
> linked list, except it's an array. Which does zero memory allocations
> for a single entry and will then allocate a single node for your first
> 64 entries.
Won't work - those struct file can get freed while we are collecting the
set/allocating epitem/calling ->poll()/etc.
Powered by blists - more mailing lists