]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: xlist link dentries instead of set 19089/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 21 Nov 2017 16:49:51 +0000 (08:49 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 4 Dec 2017 22:05:50 +0000 (14:05 -0800)
commit4f2fa427f483a29df168053d0021ee35c1aa207d
tree88d46fec5eeee9152efe46d8c193a921d755c6cb
parentfa0cdaf2e38fe38c7baef16cd2d79508b7b2c392
client: xlist link dentries instead of set

This saves space and avoids unnecessary set logic. In particular, we no longer
need to do a heap allocation for each Dentry * in the std::set.

Before:

(gdb) print sizeof(Inode)
$1 = 1336
(gdb) print sizeof(Inode::dn_set)
$2 = 48

After:

(gdb) print sizeof(Inode)
$1 = 1360
(gdb) print sizeof(Inode::dentries)
$2 = 24

I'm not sure why the Inode size increased when the member size decreased (weird
padding by g++)? Anyway, we still get the benefit of no heap allocations for
the Dentry *s.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/client/Client.cc
src/client/Dentry.cc
src/client/Dentry.h
src/client/Inode.cc
src/client/Inode.h
src/include/xlist.h
src/tools/ceph-client-debug.cc