login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
July
»
21
Re: [PATCH] Don't apply for write lock on tasklist_lock if parent doesn't ptrace other processes
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: [PATCH] Don't apply for write lock on tasklist_lock if parent doesn't ptrace other processes
Date: Wednesday, July 21, 2010 - 2:49 pm
On Thu, 15 Jul 2010 14:51:03 +0800 "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> wrote:
quoted text
> We run some sub-cases (fork, exec, pipe, tcp, udp) of aim7 on 8-socket machine. > Perf shows write_lock_irq(&tasklist_lock) consumes more than 50% cpu time. > > One hot caller is exit_ptrace. If the exiting process doesn't ptrace other > processes, kernel needn't apply for the write lock on tasklist_lock. > > With below patch against kernel 2.6.35-rc5, we get more than 10% result improvement. > > Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com> > > --- > > diff -Nraup linux-2.6.35-rc5/kernel/ptrace.c linux-2.6.35-rc5_ptrace/kernel/ptrace.c > --- linux-2.6.35-rc5/kernel/ptrace.c 2010-07-16 14:01:15.000000000 +0800 > +++ linux-2.6.35-rc5_ptrace/kernel/ptrace.c 2010-07-16 14:03:20.000000000 +0800 > @@ -331,6 +331,9 @@ void exit_ptrace(struct task_struct *tra > struct task_struct *p, *n; > LIST_HEAD(ptrace_dead); > > + if (list_empty(&tracer->ptraced)) > + return; > + > write_lock_irq(&tasklist_lock); > list_for_each_entry_safe(p, n, &tracer->ptraced, ptrace_entry) { > if (__ptrace_detach(tracer, p))
hah, nice patch - an easy 10%. I snuck a cc:stable into the changelog in the hope that those guys mistake it for a bugfix ;) --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] Don't apply for write lock on tasklist_lock if par ...
, Zhang, Yanmin
, (Wed Jul 14, 11:51 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, David Rientjes
, (Thu Jul 15, 12:53 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Andrew Morton
, (Wed Jul 21, 2:49 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Roland McGrath
, (Wed Jul 21, 3:25 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Oleg Nesterov
, (Thu Jul 22, 2:05 am)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Roland McGrath
, (Thu Jul 22, 12:24 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Zhang, Yanmin
, (Fri Jul 23, 1:45 am)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Oleg Nesterov
, (Fri Jul 23, 10:34 am)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Oleg Nesterov
, (Fri Jul 23, 10:40 am)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Zhang, Yanmin
, (Sun Jul 25, 10:05 pm)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Oleg Nesterov
, (Mon Jul 26, 1:53 am)
RE: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Kleen, Andi
, (Mon Jul 26, 2:40 am)
Re: [PATCH] Don't apply for write lock on tasklist_lock if ...
, Zhang, Yanmin
, (Mon Jul 26, 6:15 pm)
[PATCH] ptrace: optimize exit_ptrace() for the likely case
, Oleg Nesterov
, (Thu Jul 29, 8:12 am)
Re: [PATCH] ptrace: optimize exit_ptrace() for the likely case
, Roland McGrath
, (Thu Jul 29, 10:40 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Tony Luck
Re: Hardware Error Kernel Mini-Summit
James Bottomley
Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700
Andrey Borzenkov
Re: [possible regression] 2.6.22 reiserfs/libata sporadically hangs on resume from...
Jeffrey V. Merkey
Re: Versioning file system
David Miller
Re: NO_HZ: timer interrupt stuck
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Morten Welinder
Re: [PATCH] use xrealloc in help.c
Miles Bader
Re: way to automatically add untracked files?
Alex Riesen
Re: git exclude patterns for directory
linux-netdev
:
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Andreas Sundstrom
Re: ~60k interrupts/sec for 1Gb/s iperf with r8169
Denys Fedoryshchenko
Re: circular locking, mirred, 2.6.24.2
Pavel Emelyanov
Re: [PATCH 7/8] af_unix: Allow credentials to work across user and pid namespaces.
David Shwatrz
[PATCH net-next-2.6] XFRM: remove unused member in xfrm_encap_tmpl.
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
m68k: amiga - Mouse platform device conversion
Linux Kernel Mailing List
drivers/acpi: use kasprintf
openbsd-misc
:
frantisek holop
Re: mount ffs as msdos, system hangs
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Damien Miller
Re: Patching a SSH 'Weakness'
Colocation donated by:
Syndicate