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]
Date:	Thu, 13 Nov 2014 17:27:36 -0500
From:	Tejun Heo <tj@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jens Axboe <axboe@...nel.dk>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH vfs 1/2] lib: implement ptrset

Hello, Andrew.

On Thu, Nov 13, 2014 at 02:23:33PM -0800, Andrew Morton wrote:
> This seems rather slow and bloaty.  Why not
> 
> struct tjpointer {
> 	struct list_head list;
> 	void *pointer;
> };
> 
> And then callers do things like
> 
> 	struct tjpointer *tjp;
> 
> 	lock();
> 
> 	for_each_tjpointer(tjp, &my_tjpointer_list) {
> 		foo(tjp->ptr);
> 	}
> 
> 	tjpointer_del(tjp);
> 
> 	unlock();
> 
> That's less storage, vastly less support code, insertion and removal
> are O(1) and it doesn't need the ghastly preload thing.

The goal is moving the memory necessary for indexing to the indexer
instead of the indexees.  In the above case, the indexee would have to
either embed tjpointer inside it or at least have a pointer pointing
at it.  With ptrset, all necessary memory areas are allocated on the
ptrset side.  This is used to remove inode->i_devices list_head which
is currently occupying two pointers on all inodes while being used
only for block and char dev inodes in the cold paths.

Thanks.

-- 
tejun
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ