[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101008191047.GA29976@infradead.org>
Date: Fri, 8 Oct 2010 15:10:47 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Al Viro <viro@...IV.linux.org.uk>,
Dave Chinner <david@...morbit.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator
On Fri, Oct 08, 2010 at 04:06:12PM +0200, Eric Dumazet wrote:
> On 32bit arches, inum for sockets/pipes could be pretty fast
>
> unsigned u32 rnd_val __read_mostly; /* seeded at boot time */
>
> unsigned u32 get_inum(struct inode *ino, size_t size)
> {
> return rnd_val ^ ((long)ino + random32() % size);
> }
>
> (Ie , use fact that an inode is a kernel object, with a given address
> and a given size, two inodes cannot overlap)
Yeah, we could probably do this. From looking at the remaining users
of the last_ino replacement this could probably work for them.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists