FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-14-2012, 04:24 PM
Sasha Levin
 
Default generic hashtable implementation

There are quite a few places in the kernel which implement a hashtable
in a very similar way. Instead of having implementations of a hashtable
all over the kernel, we can re-use the code.

New changes since the RFC:

- Addressed last comments about previous patches.
- RCU support.
- Simplified the case where the hashtable is allocated statically, which is
the common case.
- A lot more places converted to use the new hashtable.


Sasha Levin (16):
hashtable: introduce a small and naive hashtable
user_ns: use new hashtable implementation
mm,ksm: use new hashtable implementation
workqueue: use new hashtable implementation
mm/huge_memory: use new hashtable implementation
tracepoint: use new hashtable implementation
net,9p: use new hashtable implementation
block,elevator: use new hashtable implementation
SUNRPC/cache: use new hashtable implementation
dlm: use new hashtable implementation
net,l2tp: use new hashtable implementation
dm: use new hashtable implementation
lockd: use new hashtable implementation
net,rds: use new hashtable implementation
openvswitch: use new hashtable implementation
tracing output: use new hashtable implementation

block/blk.h | 2 +-
block/elevator.c | 23 +--
drivers/md/dm-snap.c | 24 +--
drivers/md/persistent-data/dm-block-manager.c | 1 -
.../persistent-data/dm-persistent-data-internal.h | 19 --
.../md/persistent-data/dm-transaction-manager.c | 30 +--
fs/dlm/lowcomms.c | 47 +---
fs/lockd/svcsubs.c | 58 ++--
include/linux/elevator.h | 5 +-
include/linux/hashtable.h | 284 ++++++++++++++++++++
kernel/trace/trace_output.c | 20 +-
kernel/tracepoint.c | 27 +--
kernel/user.c | 33 +--
kernel/workqueue.c | 86 +-----
mm/huge_memory.c | 57 +---
mm/ksm.c | 33 +--
net/9p/error.c | 21 +-
net/l2tp/l2tp_core.c | 132 ++++------
net/l2tp/l2tp_core.h | 8 +-
net/l2tp/l2tp_debugfs.c | 19 +-
net/openvswitch/vport.c | 30 +--
net/rds/bind.c | 20 +-
net/rds/connection.c | 102 +++----
net/sunrpc/cache.c | 20 +-
24 files changed, 573 insertions(+), 528 deletions(-)
delete mode 100644 drivers/md/persistent-data/dm-persistent-data-internal.h
create mode 100644 include/linux/hashtable.h

--
1.7.8.6

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-14-2012, 06:16 PM
"J. Bruce Fields"
 
Default generic hashtable implementation

On Tue, Aug 14, 2012 at 06:24:34PM +0200, Sasha Levin wrote:
> SUNRPC/cache: use new hashtable implementation
..
> lockd: use new hashtable implementation

FWIW, these look fine (and I ran them through some nfs tests and didn't
see any problems).

--b.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-19-2012, 12:52 AM
Sasha Levin
 
Default generic hashtable implementation

There are quite a few places in the kernel which implement a hashtable
in a very similar way. Instead of having implementations of a hashtable
all over the kernel, we can re-use the code.

Since it looks like all the major issues we're addressed in the RFC phase
and no major issues were raised with this patch set, I'd be happy to see
this getting merged so that work could continue on different aspects of
the hashtable. Some interesting directions include:

- Introducing a dynamic RCU hashtable such as the one Mathieu Desnoyers
wrote about out in the userspace RCU.

- Replacing the rest of the the kernel structures which use the same basec
hashtable construct to use this new interface.

- Same as above, but for non-obvious places (for example, I'm looking into
using the hashtable to store KVM vcpus instead of the linked list being used
there now - this should help performance with a large amount of vcpus).


Changes since v1:

- Added missing hash_init in rds and lockd.
- Addressed the userns comments by Eric Biederman.
- Ran a small test to confirm hash_32 does a good job for low key
values (1-10000), which showed it did - this resulted in no changes to the
code.


Sasha Levin (16):
hashtable: introduce a small and naive hashtable
userns: use new hashtable implementation
mm,ksm: use new hashtable implementation
workqueue: use new hashtable implementation
mm/huge_memory: use new hashtable implementation
tracepoint: use new hashtable implementation
net,9p: use new hashtable implementation
block,elevator: use new hashtable implementation
SUNRPC/cache: use new hashtable implementation
dlm: use new hashtable implementation
net,l2tp: use new hashtable implementation
dm: use new hashtable implementation
lockd: use new hashtable implementation
net,rds: use new hashtable implementation
openvswitch: use new hashtable implementation
tracing output: use new hashtable implementation

block/blk.h | 2 +-
block/elevator.c | 23 +--
drivers/md/dm-snap.c | 24 +--
drivers/md/persistent-data/dm-block-manager.c | 1 -
.../persistent-data/dm-persistent-data-internal.h | 19 --
.../md/persistent-data/dm-transaction-manager.c | 30 +--
fs/dlm/lowcomms.c | 47 +---
fs/lockd/svcsubs.c | 66 +++--
include/linux/elevator.h | 5 +-
include/linux/hashtable.h | 284 ++++++++++++++++++++
kernel/trace/trace_output.c | 20 +-
kernel/tracepoint.c | 27 +--
kernel/user.c | 33 +--
kernel/workqueue.c | 86 +-----
mm/huge_memory.c | 57 +---
mm/ksm.c | 33 +--
net/9p/error.c | 21 +-
net/l2tp/l2tp_core.c | 134 ++++------
net/l2tp/l2tp_core.h | 8 +-
net/l2tp/l2tp_debugfs.c | 19 +-
net/openvswitch/vport.c | 30 +--
net/rds/bind.c | 28 ++-
net/rds/connection.c | 102 +++----
net/sunrpc/cache.c | 20 +-
24 files changed, 591 insertions(+), 528 deletions(-)
delete mode 100644 drivers/md/persistent-data/dm-persistent-data-internal.h
create mode 100644 include/linux/hashtable.h

--
1.7.8.6

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-22-2012, 02:26 AM
Sasha Levin
 
Default generic hashtable implementation

There are quite a few places in the kernel which implement a hashtable
in a very similar way. Instead of having implementations of a hashtable
all over the kernel, we can re-use the code.

Since it looks like all the major issues we're addressed in the RFC phase
and no major issues were raised with this patch set, I'd be happy to see
this getting merged so that work could continue on different aspects of
the hashtable. Some interesting directions include:

- Introducing a dynamic RCU hashtable such as the one Mathieu Desnoyers
wrote about out in the userspace RCU.

- Replacing the rest of the the kernel structures which use the same basec
hashtable construct to use this new interface.

- Same as above, but for non-obvious places (for example, I'm looking into
using the hashtable to store KVM vcpus instead of the linked list being used
there now - this should help performance with a large amount of vcpus).


Changes since v2:
- Documentation improvements from Mathieu Desnoyers.
- Converted the SUNRPC audit code to use hashtables as well. Since that code
requires a dynamic hashtable this shows off the _size() API usage.

Changes since v1:

- Added missing hash_init in rds and lockd.
- Addressed the userns comments by Eric Biederman.
- Ran a small test to confirm hash_32 does a good job for low key
values (1-10000), which showed it did - this resulted in no changes to the
code.

Sasha Levin (17):
hashtable: introduce a small and naive hashtable
userns: use new hashtable implementation
mm,ksm: use new hashtable implementation
workqueue: use new hashtable implementation
mm/huge_memory: use new hashtable implementation
tracepoint: use new hashtable implementation
net,9p: use new hashtable implementation
block,elevator: use new hashtable implementation
SUNRPC/cache: use new hashtable implementation
dlm: use new hashtable implementation
net,l2tp: use new hashtable implementation
dm: use new hashtable implementation
lockd: use new hashtable implementation
net,rds: use new hashtable implementation
openvswitch: use new hashtable implementation
tracing output: use new hashtable implementation
SUNRPC: use new hashtable implementation in auth

block/blk.h | 2 +-
block/elevator.c | 23 +--
drivers/md/dm-snap.c | 24 +--
drivers/md/persistent-data/dm-block-manager.c | 1 -
.../persistent-data/dm-persistent-data-internal.h | 19 --
.../md/persistent-data/dm-transaction-manager.c | 30 +--
fs/dlm/lowcomms.c | 47 +---
fs/lockd/svcsubs.c | 66 +++--
include/linux/elevator.h | 5 +-
include/linux/hashtable.h | 291 ++++++++++++++++++++
kernel/trace/trace_output.c | 20 +-
kernel/tracepoint.c | 27 +-
kernel/user.c | 33 +--
kernel/workqueue.c | 86 +-----
mm/huge_memory.c | 57 +---
mm/ksm.c | 33 +--
net/9p/error.c | 21 +-
net/l2tp/l2tp_core.c | 134 ++++------
net/l2tp/l2tp_core.h | 8 +-
net/l2tp/l2tp_debugfs.c | 19 +-
net/openvswitch/vport.c | 30 +--
net/rds/bind.c | 28 ++-
net/rds/connection.c | 102 +++----
net/sunrpc/auth.c | 45 ++--
net/sunrpc/cache.c | 20 +-
25 files changed, 617 insertions(+), 554 deletions(-)
delete mode 100644 drivers/md/persistent-data/dm-persistent-data-internal.h
create mode 100644 include/linux/hashtable.h

--
1.7.8.6

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 07:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org