• Andrew Morton's avatar
    [PATCH] dnotify_parent speedup · 0079e33e
    Andrew Morton authored
    From: Anton Blanchard <anton@samba.org>
    
    Directory notify code was showing up in a dd bs=1024k from 2 raid arrays
    on an emulex FC adapter:
    
    3635     69.4896  vmlinux-2.6.5            .default_idle
    332       6.3468  vmlinux-2.6.5            .__copy_tofrom_user
    112       2.1411  vmlinux-2.6.5            .save_remaining_regs
    76        1.4529  vmlinux-2.6.5            .scsi_dispatch_cmd
    64        1.2235  vmlinux-2.6.5            .dnotify_parent
    61        1.1661  vmlinux-2.6.5            .do_generic_mapping_read
    
    We already have a sysctl to enable/disable it, the patch below uses it
    in dnotify_parent. dnotify_parent disappears and idle time goes up:
    
    4508     70.8582  vmlinux-2.6.5            .default_idle
    253       3.9767  vmlinux-2.6.5            .__copy_tofrom_user
    142       2.2320  vmlinux-2.6.5            .save_remaining_regs
    88        1.3832  vmlinux-2.6.5            .shrink_zone
    84        1.3203  vmlinux-2.6.5            .elx_drvr_unlock
    75        1.1789  vmlinux-2.6.5            .scsi_dispatch_cmd
    69        1.0846  vmlinux-2.6.5            .do_generic_mapping_read
    
    Of course, to gain this small speedup isers need to know to set
    /proc/sys/fs/dir-notify-enable to zero.  Nobody does that.
    0079e33e
dnotify.c 4.23 KB