1. 14 Aug, 2009 5 commits
    • Joe Perches's avatar
      Add reading and using .mailmap file if it exists · 6ca6e06f
      Joe Perches authored
      Convert address entries in .mailmap to first encountered address
      Don't terminate shell commands with \n
      Strip characters found after sign-offs by: name <address> [stripped]
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6ca6e06f
    • Joe Perches's avatar
      Added format_email and parse_email routines to reduce inline use. · 95c698ef
      Joe Perches authored
      Added email_address_inuse to eliminate multiple maintainer entries
      for the same email address, the first name encountered is used.
      
      Used internal perl equivalents of shell cmd use of grep|cut|sort|uniq
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      95c698ef
    • Joe Perches's avatar
      --pattern-depth is used to control how many levels of directory traversal · 364c37e5
      Joe Perches authored
      should be performed to find maintainers.  default is 0 (all directory levels).
      
      For instance:
      
      MAINTAINERS currently has multiple M: and F: entries that match
      net/netfilter/ipvs/ip_vs_app.c
      
      IPVS
      M:	Wensong Zhang <wensong@linux-vs.org>
      M:	Simon Horman <horms@verge.net.au>
      M:	Julian Anastasov <ja@ssi.bg>
      [...]
      F:	net/netfilter/ipvs/
      
      NETFILTER/IPTABLES/IPCHAINS
      [...]
      M:	Patrick McHardy <kaber@trash.net>
      [...]
      F:	net/netfilter/
      
      NETWORKING [GENERAL]
      M:	"David S. Miller" <davem@davemloft.net>
      [...]
      F:	net/
      
      THE REST
      M:	Linus Torvalds <torvalds@linux-foundation.org>
      [...]
      F:	*/
      
      Using this command will return all of those maintainers:
      (except Linus unless --git-chief-maintainers is specified)
      
      $ ./scripts/get_maintainer.pl --nogit -nol \
      	-f net/netfilter/ipvs/ip_vs_app.c
      Julian Anastasov <ja@ssi.bg>
      Simon Horman <horms@verge.net.au>
      Wensong Zhang <wensong@linux-vs.org>
      Patrick McHardy <kaber@trash.net>
      David S. Miller <davem@davemloft.net>
      
      Adding --pattern-depth=1 will match at the deepest level
      $ ./scripts/get_maintainer.pl --nogit -nol --pattern-depth=1 \
      	-f net/netfilter/ipvs/ip_vs_app.c
      Julian Anastasov <ja@ssi.bg>
      Simon Horman <horms@verge.net.au>
      Wensong Zhang <wensong@linux-vs.org>
      
      Adding --pattern-depth=2 will match at the deepest level and 1 higher
      $ ./scripts/get_maintainer.pl --nogit -nol --pattern-depth=2 \
      	-f net/netfilter/ipvs/ip_vs_app.c
      Julian Anastasov <ja@ssi.bg>
      Simon Horman <horms@verge.net.au>
      Wensong Zhang <wensong@linux-vs.org>
      Patrick McHardy <kaber@trash.net>
      
      and so on.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      364c37e5
    • Joe Perches's avatar
      Before this change, matched sections were added in the order · b7ced817
      Joe Perches authored
      of appearance in the normally alphabetic section order of
      the MAINTAINERS file.
      
      For instance, finding the maintainer for drivers/scsi/wd7000.c
      would first find "SCSI SUBSYSTEM", then "WD7000 SCSI SUBSYSTEM",
      then "THE REST".
      
      before patch:
      
      $ ./scripts/get_maintainer.pl --nogit -f drivers/scsi/wd7000.c
      James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Miroslav Zagorac <zaga@fly.cc.fer.hr>
      linux-scsi@vger.kernel.org
      linux-kernel@vger.kernel.org
      
      get_maintainer.pl now selects matched sections by longest pattern match.
      Longest is the number of "/"s and any specific file pattern.
      
      This changes the example output order of MAINTAINERS to whatever is
      selected in "WD7000 SUBSYSTEM", then "SCSI SYSTEM", then "THE REST".
      
      after patch:
      
      $ ./scripts/get_maintainer.pl --nogit -f drivers/scsi/wd7000.c
      Miroslav Zagorac <zaga@fly.cc.fer.hr>
      James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      linux-scsi@vger.kernel.org
      linux-kernel@vger.kernel.org
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b7ced817
    • Joe Perches's avatar
      Julia Lawall suggested that get_maintainers.pl should have the · fb31daf9
      Joe Perches authored
      ability to include signatories of commits that are modified by
      a particular patch.
      
      Vegard Nossum did something similar once.
      http://lkml.org/lkml/2008/5/29/449
      
      The modified script looks the commits for all lines in the
      patch, and includes the "-by:" signatories for those commits.
      It uses the same git-min-percent, git-max-maintainers, and
      git-min-signatures options.  git-since is ignored.
      
      It can be used independently from the --git default, so
              ./scripts/get_maintainers.pl --nogit --git-blame <patch>
      or
              ./scripts/get_maintainers.pl --nogit --git-blame -f <file>
      is acceptable.
      
      If used with -f <file>, all lines/commits for the file are
      checked.
      
      --git-blame can be slow if used with -f <file>
      --git-blame does not work with -f <directory>
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      fb31daf9
  2. 04 Aug, 2009 1 commit
  3. 31 Jul, 2009 3 commits
    • Xiao Guangrong's avatar
      This patch is incomplete and thanks for Peter Zijlstra to point out · 7942b5e1
      Xiao Guangrong authored
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7942b5e1
    • Xiao Guangrong's avatar
      There is a race between generic_smp_call_function_*() and hotplug_cfd() in · 773438d6
      Xiao Guangrong authored
      many cases, see below examples:
      
      1: hotplug_cfd() can free cfd->cpumask, the system will crash if the
         cpu's cfd still in the call_function list:
      
      
            CPU A:                         CPU B
      
       smp_call_function_many()	    ......
         cpu_down()                      ......
        hotplug_cfd() ->                 ......
       free_cpumask_var(cfd->cpumask)  (receive function IPI interrupte)
                                      /* read cfd->cpumask */
                                generic_smp_call_function_interrupt() ->
                               cpumask_test_and_clear_cpu(cpu, data->cpumask)
      
                               	CRASH!!!
      
      2: It's not handle call_function list when cpu down, It's will lead to
         dead-wait if other path is waiting this cpu to execute function
      
          CPU A:                           CPU B
      
       smp_call_function_many(wait=0)
              ......			    CPU B down
         smp_call_function_many() -->  (cpu down before recevie function
          csd_lock(&data->csd);         IPI interrupte)
      
          DEAD-WAIT!!!!
      
        So, CPU A will dead-wait in csd_lock(), the same as
        smp_call_function_single()
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      773438d6
    • Andrew Morton's avatar
      Move hotplug_cfd() to the end of the file so that we can see what changes · 822713a2
      Andrew Morton authored
      the next patch (generic-ipi: fix the race between
      generic_smp_call_function_*() and hotplug_cfd()) actually makes to that
      function.
      
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      822713a2
  4. 30 Jul, 2009 1 commit
  5. 20 Aug, 2009 5 commits
  6. 19 Aug, 2009 2 commits
    • Nick Piggin's avatar
      We have had a report of bad memory allocation latency during DVD-RAM (UDF) · cb8cbecc
      Nick Piggin authored
      writing.  This is causing the user's desktop session to become unusable.
      
      Jan tracked the cause of this down to UDF inode reclaim blocking:
      
      gnome-screens D ffff810006d1d598     0 20686      1
       ffff810006d1d508 0000000000000082 ffff810037db6718 0000000000000800
       ffff810006d1d488 ffffffff807e4280 ffffffff807e4280 ffff810006d1a580
       ffff8100bccbc140 ffff810006d1a8c0 0000000006d1d4e8 ffff810006d1a8c0
      Call Trace:
       [<ffffffff804477f3>] io_schedule+0x63/0xa5
       [<ffffffff802c2587>] sync_buffer+0x3b/0x3f
       [<ffffffff80447d2a>] __wait_on_bit+0x47/0x79
       [<ffffffff80447dc6>] out_of_line_wait_on_bit+0x6a/0x77
       [<ffffffff802c24f6>] __wait_on_buffer+0x1f/0x21
       [<ffffffff802c442a>] __bread+0x70/0x86
       [<ffffffff88de9ec7>] :udf:udf_tread+0x38/0x3a
       [<ffffffff88de0fcf>] :udf:udf_update_inode+0x4d/0x68c
       [<ffffffff88de26e1>] :udf:udf_write_inode+0x1d/0x2b
       [<ffffffff802bcf85>] __writeback_single_inode+0x1c0/0x394
       [<ffffffff802bd205>] write_inode_now+0x7d/0xc4
       [<ffffffff88de2e76>] :udf:udf_clear_inode+0x3d/0x53
       [<ffffffff802b39ae>] clear_inode+0xc2/0x11b
       [<ffffffff802b3ab1>] dispose_list+0x5b/0x102
       [<ffffffff802b3d35>] shrink_icache_memory+0x1dd/0x213
       [<ffffffff8027ede3>] shrink_slab+0xe3/0x158
       [<ffffffff8027fbab>] try_to_free_pages+0x177/0x232
       [<ffffffff8027a578>] __alloc_pages+0x1fa/0x392
       [<ffffffff802951fa>] alloc_page_vma+0x176/0x189
       [<ffffffff802822d8>] __do_fault+0x10c/0x417
       [<ffffffff80284232>] handle_mm_fault+0x466/0x940
       [<ffffffff8044b922>] do_page_fault+0x676/0xabf
      
      This blocks with iprune_mutex held, which then blocks other reclaimers:
      
      X             D ffff81009d47c400     0 17285  14831
       ffff8100844f3728 0000000000000086 0000000000000000 ffff81000000e288
       ffff81000000da00 ffffffff807e4280 ffffffff807e4280 ffff81009d47c400
       ffffffff805ff890 ffff81009d47c740 00000000844f3808 ffff81009d47c740
      Call Trace:
       [<ffffffff80447f8c>] __mutex_lock_slowpath+0x72/0xa9
       [<ffffffff80447e1a>] mutex_lock+0x1e/0x22
       [<ffffffff802b3ba1>] shrink_icache_memory+0x49/0x213
       [<ffffffff8027ede3>] shrink_slab+0xe3/0x158
       [<ffffffff8027fbab>] try_to_free_pages+0x177/0x232
       [<ffffffff8027a578>] __alloc_pages+0x1fa/0x392
       [<ffffffff8029507f>] alloc_pages_current+0xd1/0xd6
       [<ffffffff80279ac0>] __get_free_pages+0xe/0x4d
       [<ffffffff802ae1b7>] __pollwait+0x5e/0xdf
       [<ffffffff8860f2b4>] :nvidia:nv_kern_poll+0x2e/0x73
       [<ffffffff802ad949>] do_select+0x308/0x506
       [<ffffffff802adced>] core_sys_select+0x1a6/0x254
       [<ffffffff802ae0b7>] sys_select+0xb5/0x157
      
      Now I think the main problem is having the filesystem block (and do IO) in
      inode reclaim.  The problem is that this doesn't get accounted well and
      penalizes a random allocator with a big latency spike caused by work
      generated from elsewhere.
      
      I think the best idea would be to avoid this.  By design if possible, or
      by deferring the hard work to an asynchronous context.  If the latter,
      then the fs would probably want to throttle creation of new work with
      queue size of the deferred work, but let's not get into those details.
      
      Anyway, the other obvious thing we looked at is the iprune_mutex which is
      causing the cascading blocking.  We could turn this into an rwsem to
      improve concurrency.  It is unreasonable to totally ban all potentially
      slow or blocking operations in inode reclaim, so I think this is a cheap
      way to get a small improvement.
      
      This doesn't solve the whole problem of course.  The process doing inode
      reclaim will still take the latency hit, and concurrent processes may end
      up contending on filesystem locks.  So fs developers should keep these
      problems in mind.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      cb8cbecc
    • Rusty Russell's avatar
      Impact: cleanup · 48fbf759
      Rusty Russell authored
      No need for redeclaration.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      48fbf759
  7. 14 Aug, 2009 1 commit
  8. 22 Jul, 2009 1 commit
    • Scott James Remnant's avatar
      The act of a process becoming a session leader is a useful signal to a · 2c1da2f9
      Scott James Remnant authored
      supervising init daemon such as Upstart.
      
      While a daemon will normally do this as part of the process of becoming a
      daemon, it is rare for its children to do so.  When the children do, it is
      nearly always a sign that the child should be considered detached from the
      parent and not supervised along with it.
      
      The poster-child example is OpenSSH; the per-login children call setsid()
      so that they may control the pty connected to them.  If the primary daemon
      dies or is restarted, we do not want to consider the per-login children
      and want to respawn the primary daemon without killing the children.
      
      This patch adds a new PROC_SID_EVENT and associated structure to the
      proc_event event_data union, it arranges for this to be emitted when the
      special PIDTYPE_SID pid is set.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarScott James Remnant <scott@ubuntu.com>
      Acked-by: default avatarMatt Helsley <matthltc@us.ibm.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2c1da2f9
  9. 17 Aug, 2009 1 commit
  10. 31 Jul, 2009 2 commits
  11. 28 Jul, 2009 1 commit
    • Andrew Morton's avatar
      Use atomic_dec_return(). · 341f2f7c
      Andrew Morton authored
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      341f2f7c
  12. 30 Jul, 2009 1 commit
    • Xiao Guangrong's avatar
      This patch can remove spinlock from struct call_function_data, the · e0335959
      Xiao Guangrong authored
      reasons are below:
      
      1: add a new interface for cpumask named cpumask_test_and_clear_cpu(),
         it can atomically test and clear specific cpu, we can use it instead
         of cpumask_test_cpu() and cpumask_clear_cpu() and no need data->lock
         to protect those in generic_smp_call_function_interrupt().
      
      2: in smp_call_function_many(), after csd_lock() return, the current's
         cfd_data is deleted from call_function list, so it not have race
         between other cpus, then cfs_data is only used in
         smp_call_function_many() that must disable preemption and not from
         a hardware interrupthandler or from a bottom half handler to call,
         only the correspond cpu can use it, so it not have race in current
         cpu, no need cfs_data->lock to protect it.
      
      3: after 1 and 2, cfs_data->lock is only use to protect cfs_data->refs in
         generic_smp_call_function_interrupt(), so we can define cfs_data->refs
         to atomic_t, and no need cfs_data->lock any more.
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      e0335959
  13. 24 Jul, 2009 1 commit
  14. 23 Jul, 2009 1 commit
  15. 13 Jul, 2009 1 commit
    • Neil Horman's avatar
      The user mode helper code has a race in it. call_usermodehelper_exec() · fd8fa92e
      Neil Horman authored
      takes an allocated subprocess_info structure, which it passes to a
      workqueue, and then passes it to a kernel thread which it creates, after
      which it calls complete to signal to the caller of
      call_usermodehelper_exec() that it can free the subprocess_info struct.
      
      But since we use that structure in the created thread, we can't call
      complete from __call_usermodehelper(), which is where we create the kernel
      thread.  We need to call complete() from within the kernel thread and then
      not use subprocess_info afterward in the case of UMH_WAIT_EXEC.  Tested
      successfully by me.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      fd8fa92e
  16. 29 Jun, 2009 2 commits
  17. 13 Jul, 2009 6 commits
  18. 13 Aug, 2009 2 commits
  19. 23 Jul, 2009 1 commit
  20. 13 Aug, 2009 1 commit
  21. 23 Jul, 2009 1 commit