All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] cifs: convert tlink_tree to a rbtree
@ 2010-10-28 11:33 Jeff Layton
       [not found] ` <1288265619-20616-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Layton @ 2010-10-28 11:33 UTC (permalink / raw)
  To: smfrench-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

The new multiuser mount code in CIFS uses a radix tree to track
tcon_link entries. The main reason for this is historical. The initial
implementation that I did used a radix tree with pointers to
cifsTconInfo structs.

I chose that because it was possible that a tcon could be in more than
one tree at a time. It became evident in later versions however that I
needed a separate tracking struct to handle the refcounting. Thus, the
tcon_link was born, but I kept the initial design of a radix tree.

We recently had a bit of a kerfuffle surrounding the use of radix trees
with IMA to track inodes. While we'll likely have considerably fewer
radix tree entries, it's not really the best choice here either. The
tcon_link struct will only ever be in one tlink_tree, so we can embed
a tracking structure inside it.

This patchset converts that code to use a rbtree instead. This should
be as fast or faster than using a radix tree. It also has the benefit of
not requiring memory allocations on insertion which simplifies the
error handling in those codepaths.

Jeff Layton (2):
  cifs: store pointer to master tlink in superblock
  cifs: convert tlink_tree to a rbtree

 fs/cifs/cifs_fs_sb.h |    6 +-
 fs/cifs/cifsfs.c     |    2 +-
 fs/cifs/cifsglob.h   |    3 +-
 fs/cifs/connect.c    |  191 +++++++++++++++++++++++++------------------------
 4 files changed, 103 insertions(+), 99 deletions(-)

-- 
1.7.2.3

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

end of thread, other threads:[~2010-10-28 16:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 11:33 [PATCH 0/2] cifs: convert tlink_tree to a rbtree Jeff Layton
     [not found] ` <1288265619-20616-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-28 11:33   ` [PATCH 1/2] cifs: store pointer to master tlink in superblock Jeff Layton
     [not found]     ` <1288265619-20616-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-28 15:06       ` Shirish Pargaonkar
     [not found]         ` <AANLkTik1mS3hH75GH6cW4Zz8FNv6P1brqvh1ggNG--xw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-28 16:23           ` Jeff Layton
     [not found]             ` <20101028122325.31997c58-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-10-28 16:50               ` Jeff Layton
     [not found]                 ` <20101028125007.734e0b27-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-10-28 16:54                   ` Shirish Pargaonkar
2010-10-28 11:33   ` [PATCH 2/2] cifs: convert tlink_tree to a rbtree Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.