linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] generic hashtable implementation
@ 2012-07-31 18:05 Sasha Levin
  2012-07-31 18:05 ` [RFC 1/4] hashtable: introduce a small and naive hashtable Sasha Levin
                   ` (3 more replies)
  0 siblings, 4 replies; 38+ messages in thread
From: Sasha Levin @ 2012-07-31 18:05 UTC (permalink / raw)
  To: torvalds; +Cc: tj, akpm, linux-kernel, linux-mm, paul.gortmaker, Sasha Levin

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.

This patch series introduces a very simple hashtable implementation, and
modifies three (random) modules to use it. I've limited it to 3 only
so that it would be easy to review and modify, and to show that even
at this number we already eliminate a big amount of duplicated code.

If this basic hashtable looks ok, future code will include:

 - RCU support
 - Self locking (list_bl?)
 - Converting more code to use the hashtable


Sasha Levin (4):
  hashtable: introduce a small and naive hashtable
  user_ns: use new hashtable implementation
  mm,ksm: use new hashtable implementation
  workqueue: use new hashtable implementation

 include/linux/hashtable.h      |   46 ++++++++++++++++++++
 include/linux/user_namespace.h |   11 +++--
 kernel/user.c                  |   54 ++++-------------------
 kernel/user_namespace.c        |    4 +-
 kernel/workqueue.c             |   91 ++++++---------------------------------
 mm/ksm.c                       |   29 ++++---------
 6 files changed, 87 insertions(+), 148 deletions(-)
 create mode 100644 include/linux/hashtable.h

-- 
1.7.8.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2012-08-03 17:59 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 18:05 [RFC 0/4] generic hashtable implementation Sasha Levin
2012-07-31 18:05 ` [RFC 1/4] hashtable: introduce a small and naive hashtable Sasha Levin
2012-07-31 18:23   ` Tejun Heo
2012-07-31 20:31     ` Sasha Levin
2012-08-01 18:19     ` Sasha Levin
2012-08-01 18:21       ` Tejun Heo
2012-08-01 18:24         ` Sasha Levin
2012-08-01 18:27           ` Tejun Heo
2012-08-01 19:06             ` Sasha Levin
2012-08-01 20:24               ` Tejun Heo
2012-08-01 22:41                 ` Sasha Levin
2012-08-01 22:45                   ` Tejun Heo
2012-08-02 10:00                     ` Sasha Levin
2012-08-02 10:32                       ` Josh Triplett
2012-08-02 11:23                         ` Sasha Levin
2012-08-02 13:04                           ` Sasha Levin
2012-08-02 16:15                             ` Josh Triplett
2012-08-02 16:48                               ` Sasha Levin
2012-08-02 17:44                                 ` Josh Triplett
2012-08-02 17:54                                   ` Sasha Levin
2012-08-02 20:41                                     ` Josh Triplett
2012-08-02 21:47                                       ` Sasha Levin
2012-08-03 17:59                                         ` Josh Triplett
2012-08-02 16:03                           ` Eric W. Biederman
2012-08-02 16:34                             ` Sasha Levin
2012-08-02 16:40                               ` Eric W. Biederman
2012-08-02 17:32                                 ` Linus Torvalds
2012-08-02 17:48                                   ` Eric Dumazet
2012-08-02 17:59                                   ` Josh Triplett
2012-08-02 18:08                                     ` Linus Torvalds
2012-08-02 20:25                                       ` Josh Triplett
2012-08-02 20:32                                         ` Linus Torvalds
2012-08-02 21:21                                           ` Josh Triplett
2012-08-02 21:50                                             ` Linus Torvalds
2012-08-02  9:35             ` Josh Triplett
2012-07-31 18:05 ` [RFC 2/4] user_ns: use new hashtable implementation Sasha Levin
2012-07-31 18:05 ` [RFC 3/4] mm,ksm: " Sasha Levin
2012-07-31 18:05 ` [RFC 4/4] workqueue: " Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).