17 Oct, 2007

6 commits

  • Signed-off-by: Denis Cheng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis Cheng
     
  • This patch makes shrink_dcache_sb consistent with dentry pruning policy.

    On the first pass we iterate over dentry unused list and prepare some
    dentries for removal.

    However, since the existing code moves evicted dentries to the beginning of
    the LRU it can happen that fresh dentries from other superblocks will be
    inserted *before* our dentries.

    This can result in significant slowdown of shrink_dcache_sb(). Moreover,
    for virtual filesystems like unionfs which can call dput() during dentries
    kill existing code results in O(n^2) complexity.

    We observed 2 minutes shrink_dcache_sb() with only 35000 dentries.

    To avoid this effects we propose to isolate sb dentries at the end
    of LRU list.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Kirill Korotaev
    Signed-off-by: Andrey Mirkin
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • As it stands this comment is confusing, and not quite grammatical.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • It looks like in the end all pruners want parents removed.

    So remove unused code and function arguments.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Since the mempages parameter is actually not used, they should be removed.

    Now there is only files_init use the mempages parameter,

    files_init(mempages);

    but I don't think the adaptation to mempages in files_init is really
    useful; and if files_init also changed to the prototype void (*func)(void),
    the wrapper vfs_caches_init would also not need the mempages parameter.

    Signed-off-by: Denis Cheng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis Cheng
     
  • This patch marks a number of allocations that are either short-lived such as
    network buffers or are reclaimable such as inode allocations. When something
    like updatedb is called, long-lived and unmovable kernel allocations tend to
    be spread throughout the address space which increases fragmentation.

    This patch groups these allocations together as much as possible by adding a
    new MIGRATE_TYPE. The MIGRATE_RECLAIMABLE type is for allocations that can be
    reclaimed on demand, but not moved. i.e. they can be migrated by deleting
    them and re-reading the information from elsewhere.

    Signed-off-by: Mel Gorman
    Cc: Andy Whitcroft
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     

18 Jul, 2007

1 commit

  • I can never remember what the function to register to receive VM pressure
    is called. I have to trace down from __alloc_pages() to find it.

    It's called "set_shrinker()", and it needs Your Help.

    1) Don't hide struct shrinker. It contains no magic.
    2) Don't allocate "struct shrinker". It's not helpful.
    3) Call them "register_shrinker" and "unregister_shrinker".
    4) Call the function "shrink" not "shrinker".
    5) Reduce the 17 lines of waffly comments to 13, but document it properly.

    Signed-off-by: Rusty Russell
    Cc: David Chinner
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

09 May, 2007

4 commits

  • Remove includes of where it is not used/needed.
    Suggested by Al Viro.

    Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
    sparc64, and arm (all 59 defconfigs).

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • 1) Introduces a new method in 'struct dentry_operations'. This method
    called d_dname() might be called from d_path() to build a pathname for
    special filesystems. It is called without locks.

    Future patches (if we succeed in having one common dentry for all
    pipes/sockets) may need to change prototype of this method, but we now
    use : char *d_dname(struct dentry *dentry, char *buffer, int buflen);

    2) Adds a dynamic_dname() helper function that eases d_dname() implementations

    3) Defines d_dname method for sockets : No more sprintf() at socket
    creation. This is delayed up to the moment someone does an access to
    /proc/pid/fd/...

    4) Defines d_dname method for pipes : No more sprintf() at pipe
    creation. This is delayed up to the moment someone does an access to
    /proc/pid/fd/...

    A benchmark consisting of 1.000.000 calls to pipe()/close()/close() gives a
    *nice* speedup on my Pentium(M) 1.6 Ghz :

    3.090 s instead of 3.450 s

    Signed-off-by: Eric Dumazet
    Acked-by: Christoph Hellwig
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Teach the dentry slab shrinker to aggressively shrink parent dentries when
    shrinking the dentry cache.

    This is done to attempt to improve the situation where the dentry slab cache
    gets a lot of internal fragmentation due to pages containing directory
    dentries. It is expected that this change will cause some of those dentries
    to be reaped earlier, and with less scanning.

    Needs careful testing.

    Cc: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The time shrink_dcache_parent() takes, grows quadratically with the depth
    of the tree under 'parent'. This starts to get noticable at about 10,000.

    These kinds of depths don't occur normally, and filesystems which invoke
    shrink_dcache_parent() via d_invalidate() seem to have other depth
    dependent timings, so it's not even easy to expose this problem.

    However with FUSE it's easy to create a deep tree and d_invalidate()
    will also get called. This can make a syscall hang for a very long
    time.

    This is the original discovery of the problem by Russ Cox:

    http://article.gmane.org/gmane.comp.file-systems.fuse.devel/3826

    The following patch fixes the quadratic behavior, by optionally allowing
    prune_dcache() to prune ancestors of a dentry in one go, instead of doing
    it one at a time.

    Common code in dput() and prune_one_dentry() is extracted into a new helper
    function d_kill().

    shrink_dcache_parent() as well as shrink_dcache_sb() are converted to use
    the ancestry-pruner option. Only for shrink_dcache_memory() is this
    behavior not desirable, so it keeps using the old algorithm.

    Signed-off-by: Miklos Szeredi
    Cc: Al Viro
    Cc: Maneesh Soni
    Acked-by: "Paul E. McKenney"
    Cc: Dipankar Sarma
    Cc: Neil Brown
    Cc: Trond Myklebust
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

08 May, 2007

1 commit

  • This patch provides a new macro

    KMEM_CACHE(, )

    to simplify slab creation. KMEM_CACHE creates a slab with the name of the
    struct, with the size of the struct and with the alignment of the struct.
    Additional slab flags may be specified if necessary.

    Example

    struct test_slab {
    int a,b,c;
    struct list_head;
    } __cacheline_aligned_in_smp;

    test_slab_cache = KMEM_CACHE(test_slab, SLAB_PANIC)

    will create a new slab named "test_slab" of the size sizeof(struct
    test_slab) and aligned to the alignment of test slab. If it fails then we
    panic.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

14 Feb, 2007

1 commit

  • This reverts commit eb3dfb0cb1f4a44e2d0553f89514ce9f2a9fcaf1.

    It causes some strange Gnome problem with dbus-daemon getting stuck, so
    we'll revert it until that problem is understood.

    Reported by both walt and Greg KH, who both independently git-bisected
    the problem to this commit.

    Andreas is looking at it.

    Reported-by: walt
    Reported-by: Greg KH
    Acked-by: Andreas Gruenbacher
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

13 Feb, 2007

1 commit

  • Here is a bugfix to d_path.

    First, when d_path() hits a lazily unmounted mount point, it tries to
    prepend the name of the lazily unmounted dentry to the path name. It gets
    this wrong, and also overwrites the slash that separates the name from the
    following pathname component. This is demonstrated by the attached test
    case, which prints "getcwd returned d_path-bugsubdir" with the bug. The
    correct result would be "getcwd returned d_path-bug/subdir".

    It could be argued that the name of the root dentry should not be part of
    the result of d_path in the first place. On the other hand, what the
    unconnected namespace was once reachable as may provide some useful hints
    to users, and so that seems okay.

    Second, it isn't always possible to tell from the __d_path result whether
    the specified root and rootmnt (i.e., the chroot) was reached: lazy
    unmounts of bind mounts will produce a path that does start with a
    non-slash so we can tell from that, but other lazy unmounts will produce a
    path that starts with a slash, just like "ordinary" paths.

    The attached patch cleans up __d_path() to fix the bug with overlapping
    pathname components. It also adds a @fail_deleted argument, which allows
    to get rid of some of the mess in sys_getcwd(). Grabbing the dcache_lock
    can then also be moved into __d_path(). The patch also makes sure that
    paths will only start with a slash for paths which are connected to the
    root and rootmnt.

    The @fail_deleted argument could be added to d_path() as well: this would
    allow callers to recognize deleted files, without having to resort to the
    ambiguous check for the " (deleted)" string at the end of the pathnames.
    This is not currently done, but it might be worthwhile.

    Signed-off-by: Andreas Gruenbacher
    Cc: Neil Brown
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     

08 Dec, 2006

2 commits

  • Some dentries don't need to be globally visible in dentry hashtable.
    (pipes & sockets)

    Such dentries dont need to wait for a RCU grace period at delete time.
    Being able to free them permits a better CPU cache use (hot cache)

    This patch combined with (dont insert pipe dentries into dentry_hashtable)
    reduced time of { pipe(p); close(p[0]); close(p[1]);} on my UP machine (1.6
    GHz Pentium-M) from 3.23 us to 2.86 us (But this patch does not depend on
    other patches, only bench results)

    Signed-off-by: Eric Dumazet
    Cc: Al Viro
    Cc: Maneesh Soni
    Cc: "Paul E. McKenney"
    Cc: Dipankar Sarma
    Acked-by: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

29 Oct, 2006

2 commits

  • With Vasily Averin

    Fix an error in unused dentry counting in shrink_dcache_for_umount_subtree()
    in which the count is modified without the dcache_lock held.

    Signed-off-by: David Howells
    Cc: Vasily Averin
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • On the the following patch:
    http://linux.bkbits.net:8080/linux-2.6/gnupatch@449b144ecSF1rYskg3q-SeR2vf88zg

    # ChangeSet
    # 2006/06/22 15:05:57-07:00 neilb@suse.de
    # [PATCH] Fix dcache race during umount

    # If prune_dcache finds a dentry that it cannot free, it leaves it where it
    # is (at the tail of the list) and exits, on the assumption that some other
    # thread will be removing that dentry soon.

    However as far as I see this comment is not correct: when we cannot take
    s_umount rw_semaphore (for example because it was taken in do_remount) this
    dentry is already extracted from dentry_unused list and we do not add it
    into the list again. Therefore dentry will not be found by prune_dcache()
    and shrink_dcache_sb() and will leave in memory very long time until the
    partition will be unmounted.

    The patch adds this dentry into tail of the dentry_unused list.

    Signed-off-by: Vasily Averin
    Cc: Neil Brown
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasily Averin
     

22 Oct, 2006

1 commit

  • If the caller tries to instantiate a directory using an inode that already
    has a dentry alias, then we attempt to rename the existing dentry instead
    of instantiating a new one. Fail with an ELOOP error if the rename would
    affect one of our parent directories.

    This behaviour is needed in order to avoid issues such as

    http://bugzilla.kernel.org/show_bug.cgi?id=7178

    Signed-off-by: Trond Myklebust
    Cc: Miklos Szeredi
    Cc: Maneesh Soni
    Cc: Dipankar Sarma
    Cc: Neil Brown
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

12 Oct, 2006

1 commit

  • The attached patch destroys all the dentries attached to a superblock in one go
    by:

    (1) Destroying the tree rooted at s_root.

    (2) Destroying every entry in the anon list, one at a time.

    (3) Each entry in the anon list has its subtree consumed from the leaves
    inwards.

    This reduces the amount of work generic_shutdown_super() does, and avoids
    iterating through the dentry_unused list.

    Note that locking is almost entirely absent in the shrink_dcache_for_umount*()
    functions added by this patch. This is because:

    (1) at the point the filesystem calls generic_shutdown_super(), it is not
    permitted to further touch the superblock's set of dentries, and nor may
    it remove aliases from inodes;

    (2) the dcache memory shrinker now skips dentries that are being unmounted;
    and

    (3) the superblock no longer has any external references through which the VFS
    can reach it.

    Given these points, the only locking we need to do is when we remove dentries
    from the unused list and the name hashes, which we do a directory's worth at a
    time.

    We also don't need to guard against reference counts going to zero unexpectedly
    and removing bits of the tree we're working on as nothing else can call dput().

    A cut down version of dentry_iput() has been folded into
    shrink_dcache_for_umount_subtree() function. Apart from not needing to unlock
    things, it also doesn't need to check for inotify watches.

    In this version of the patch, the complaint about a dentry still being in use
    has been expanded from a single BUG_ON() and now gives much more information.

    Signed-off-by: David Howells
    Acked-by: NeilBrown
    Acked-by: Ian Kent
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

04 Oct, 2006

1 commit

  • There is a possible race in d_splice_alias. Though __d_find_alias(inode, 1)
    will only return a dentry with DCACHE_DISCONNECTED set, it is possible for it
    to get cleared before the BUG_ON, and it is is not possible to lock against
    that.

    There are a couple of problems here. Firstly, the code doesn't match the
    comment. The comment describes a 'disconnected' dentry as being IS_ROOT as
    well as DCACHE_DISCONNECTED, however there is not testing of IS_ROOT anythere.

    A dentry is marked DCACHE_DISCONNECTED when allocated with d_alloc_anon, and
    remains DCACHE_DISCONNECTED while a path is built up towards the root. So a
    dentry can have a valid name and a valid parent and even grandparent, but will
    still be DCACHE_DISCONNECTED until a path to the root is created. Once the
    path to the root is complete, everything in the path gets DCACHE_DISCONNECTED
    cleared. So the fact that DCACHE_DISCONNECTED isn't enough to say that a
    dentry is free to be spliced in with a given name. This can only be allowed
    if the dentry does not yet have a name, so the IS_ROOT test is needed too.

    However even adding that test to __d_find_alias isn't enough. As
    d_splice_alias drops dcache_lock before calling d_move to perform the splice,
    it could race with another thread calling d_splice_alias to splice the inode
    in with a different name in a different part of the tree (in the case where a
    file has hard links). So that splicing code is only really safe for
    directories (as we know that directories only have one link). For
    directories, the caller of d_splice_alias will be holding i_mutex on the
    (unique) parent so there is no room for a race.

    A consequence of this is that a non-directory will never benefit from being
    spliced into a pre-exisiting dentry, but that isn't a problem. It is
    perfectly OK for a non-directory to have multiple dentries, some anonymous,
    some not. And the comment for d_splice_alias says that it only happens for
    directories anyway.

    Signed-off-by: Neil Brown
    Cc: Christoph Hellwig
    Cc: Al Viro
    Cc: Dipankar Sarma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

01 Oct, 2006

1 commit


23 Sep, 2006

1 commit

  • The attached patch adds a new directory cache management function that prepares
    a disconnected anonymous function to be connected into the dentry tree. The
    anonymous dentry is transferred the name and parentage from another dentry.

    The following changes were made in [try #2]:

    (*) d_materialise_dentry() now switches the parentage of the two nodes around
    correctly when one or other of them is self-referential.

    The following changes were made in [try #7]:

    (*) d_instantiate_unique() has had the interior part split out as function
    __d_instantiate_unique(). Callers of this latter function must be holding
    the appropriate locks.

    (*) _d_rehash() has been added as a wrapper around __d_rehash() to call it
    with the most obvious hash list (the one from the name). d_rehash() now
    calls _d_rehash().

    (*) d_materialise_dentry() is now __d_materialise_dentry() and is static.

    (*) d_materialise_unique() added to perform the combination of d_find_alias(),
    d_materialise_dentry() and d_add_unique() that the NFS client was doing
    twice, all within a single dcache_lock critical section. This reduces the
    number of times two different spinlocks were being accessed.

    The following further changes were made:

    (*) Add the dentries onto their parents d_subdirs lists.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     

04 Jul, 2006

2 commits


01 Jul, 2006

1 commit


27 Jun, 2006

2 commits

  • This patch converts the combination of list_del(A) and list_add(A, B) to
    list_move(A, B).

    Cc: Greg Kroah-Hartman
    Cc: Ram Pai
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This patch converts list_add(A, B.prev) to list_add_tail(A, &B) for
    readability.

    Acked-by: Karsten Keil
    Cc: Jan Harkes
    Acked-by: Jan Kara
    AOLed-by: David Woodhouse
    Cc: Sridhar Samudrala
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

26 Jun, 2006

1 commit

  • likely profiling shows that the following is a miss.

    After boot:
    [+- ] Type | # True | # False | Function:Filename@Line
    +unlikely | 1074| 0 prune_dcache()@:fs/dcache.c@409

    After a bonnie++ run:
    +unlikely | 66716| 19584 prune_dcache()@:fs/dcache.c@409

    So remove it.

    Signed-off-by: Hua Zhong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hua Zhong
     

23 Jun, 2006

3 commits

  • Extend the get_sb() filesystem operation to take an extra argument that
    permits the VFS to pass in the target vfsmount that defines the mountpoint.

    The filesystem is then required to manually set the superblock and root dentry
    pointers. For most filesystems, this should be done with simple_set_mnt()
    which will set the superblock pointer and then set the root dentry to the
    superblock's s_root (as per the old default behaviour).

    The get_sb() op now returns an integer as there's now no need to return the
    superblock pointer.

    This patch permits a superblock to be implicitly shared amongst several mount
    points, such as can be done with NFS to avoid potential inode aliasing. In
    such a case, simple_set_mnt() would not be called, and instead the mnt_root
    and mnt_sb would be set directly.

    The patch also makes the following changes:

    (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
    pointer argument and return an integer, so most filesystems have to change
    very little.

    (*) If one of the convenience function is not used, then get_sb() should
    normally call simple_set_mnt() to instantiate the vfsmount. This will
    always return 0, and so can be tail-called from get_sb().

    (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
    dcache upon superblock destruction rather than shrink_dcache_anon().

    This is required because the superblock may now have multiple trees that
    aren't actually bound to s_root, but that still need to be cleaned up. The
    currently called functions assume that the whole tree is rooted at s_root,
    and that anonymous dentries are not the roots of trees which results in
    dentries being left unculled.

    However, with the way NFS superblock sharing are currently set to be
    implemented, these assumptions are violated: the root of the filesystem is
    simply a dummy dentry and inode (the real inode for '/' may well be
    inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
    with child trees.

    [*] Anonymous until discovered from another tree.

    (*) The documentation has been adjusted, including the additional bit of
    changing ext2_* into foo_* in the documentation.

    [akpm@osdl.org: convert ipath_fs, do other stuff]
    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • - Add description of d_lock handling to comments over prune_one_dentry().

    - It has three callsites - uninline it, saving 200 bytes of text.

    Cc: Jan Blunck
    Cc: Kirill Korotaev
    Cc: Olaf Hering
    Cc: Balbir Singh
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The race is that the shrink_dcache_memory shrinker could get called while a
    filesystem is being unmounted, and could try to prune a dentry belonging to
    that filesystem.

    If it does, then it will call in to iput on the inode while the dentry is
    no longer able to be found by the umounting process. If iput takes a
    while, generic_shutdown_super could get all the way though
    shrink_dcache_parent and shrink_dcache_anon and invalidate_inodes without
    ever waiting on this particular inode.

    Eventually the superblock gets freed anyway and if the iput tried to touch
    it (which some filesystems certainly do), it will lose. The promised
    "Self-destruct in 5 seconds" doesn't lead to a nice day.

    The race is closed by holding s_umount while calling prune_one_dentry on
    someone else's dentry. As a down_read_trylock is used,
    shrink_dcache_memory will no longer try to prune the dentry of a filesystem
    that is being unmounted, and unmount will not be able to start until any
    such active prune_one_dentry completes.

    This requires that prune_dcache *knows* which filesystem (if any) it is
    doing the prune on behalf of so that it can be careful of other
    filesystems. shrink_dcache_memory isn't called it on behalf of any
    filesystem, and so is careful of everything.

    shrink_dcache_anon is now passed a super_block rather than the s_anon list
    out of the superblock, so it can get the s_anon list itself, and can pass
    the superblock down to prune_dcache.

    If prune_dcache finds a dentry that it cannot free, it leaves it where it
    is (at the tail of the list) and exits, on the assumption that some other
    thread will be removing that dentry soon. To try to make sure that some
    work gets done, a limited number of dnetries which are untouchable are
    skipped over while choosing the dentry to work on.

    I believe this race was first found by Kirill Korotaev.

    Cc: Jan Blunck
    Acked-by: Kirill Korotaev
    Cc: Olaf Hering
    Acked-by: Balbir Singh
    Signed-off-by: Neil Brown
    Signed-off-by: Balbir Singh
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

01 Apr, 2006

2 commits

  • It is very common to hash a dentry and then to call lookup. If we take fs
    specific hash functions into account the full hash logic can get ugly.
    Further full_name_hash as an inline function is almost 100 bytes on x86 so
    having a non-inline choice in some cases can measurably decrease code size.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • IN_DELETE events are no longer generated for the removal of a file from a
    watched directory.

    This seems to be a result of clearing DCACHE_INOTIFY_PARENT_WATCHED in
    d_delete() directly before calling fsnotify_nameremove().

    Assuming the flag doesn't need to be cleared before dentry_iput(), this
    should do the trick.

    Signed-off-by: Amy Griffis
    Cc: John McCutchan
    Acked-by: Robert Love
    Cc: Nick Piggin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amy Griffis
     

27 Mar, 2006

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
    drivers/char/ftape/lowlevel/fdc-io.c: Correct a comment
    Kconfig help: MTD_JEDECPROBE already supports Intel
    Remove ugly debugging stuff
    do_mounts.c: Minor ROOT_DEV comment cleanup
    BUG_ON() Conversion in drivers/s390/block/dasd_devmap.c
    BUG_ON() Conversion in mm/mempool.c
    BUG_ON() Conversion in mm/memory.c
    BUG_ON() Conversion in kernel/fork.c
    BUG_ON() Conversion in ipc/sem.c
    BUG_ON() Conversion in fs/ext2/
    BUG_ON() Conversion in fs/hfs/
    BUG_ON() Conversion in fs/dcache.c
    BUG_ON() Conversion in fs/buffer.c
    BUG_ON() Conversion in input/serio/hp_sdc_mlc.c
    BUG_ON() Conversion in md/dm-table.c
    BUG_ON() Conversion in md/dm-path-selector.c
    BUG_ON() Conversion in drivers/isdn
    BUG_ON() Conversion in drivers/char
    BUG_ON() Conversion in drivers/mtd/

    Linus Torvalds
     
  • Signed-off-by: Adrian Bunk

    Artem B. Bityuckiy
     
  • I discovered on oprofile hunting on a SMP platform that dentry lookups were
    slowed down because d_hash_mask, d_hash_shift and dentry_hashtable were in
    a cache line that contained inodes_stat. So each time inodes_stats is
    changed by a cpu, other cpus have to refill their cache line.

    This patch moves some variables to the __read_mostly section, in order to
    avoid false sharing. RCU dentry lookups can go full speed.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • this changes if() BUG(); constructs to BUG_ON() which is
    cleaner and can better optimized away

    Signed-off-by: Eric Sesterhenn
    Signed-off-by: Adrian Bunk

    Eric Sesterhenn
     

26 Mar, 2006

1 commit

  • This patch reduces scheduling latency in shrink_dcache_sb() noticed during
    remounting of big partitions with many cached dentries. The same latency
    fix was applied to select_parent() long ago.

    Signed-off-by: Denis Lunev
    Signed-off-by: Pavel Emelianov
    Signed-off-by: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev