[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080507062834.GA30306@elte.hu>
Date: Wed, 7 May 2008 08:28:34 +0200
From: Ingo Molnar <mingo@...e.hu>
To: "Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
Cc: Matthew Wilcox <matthew@....cx>,
LKML <linux-kernel@...r.kernel.org>,
Alexander Viro <viro@....linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: AIM7 40% regression with 2.6.26-rc1
* Ingo Molnar <mingo@...e.hu> wrote:
> > 3) Caller of lock_kernel are sys_fcntl/vfs_ioctl/tty_release/chrdev_open.
>
> that's one often-forgotten BKL site: about 1000 ioctls are still
> running under the BKL. The TTY one is hurting the most. [...]
although it's an unlocked_ioctl() now in 2.6.26, so all the BKL locking
has been nicely pushed down to deep inside the tty code.
> [...] To make sure it's only that BKL acquire/release that hurts,
> could you try the hack patch below, does it make any difference to
> performance?
if you use a serial console you will need the updated patch below.
Ingo
---------------------->
Subject: no: tty bkl
From: Ingo Molnar <mingo@...e.hu>
Date: Wed May 07 08:21:22 CEST 2008
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
drivers/char/tty_io.c | 5 +++--
drivers/serial/serial_core.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
Index: linux/drivers/char/tty_io.c
===================================================================
--- linux.orig/drivers/char/tty_io.c
+++ linux/drivers/char/tty_io.c
@@ -2844,9 +2844,10 @@ out:
static int tty_release(struct inode *inode, struct file *filp)
{
- lock_kernel();
+ /* DANGEROUS - can crash your kernel! */
+// lock_kernel();
release_dev(filp);
- unlock_kernel();
+// unlock_kernel();
return 0;
}
Index: linux/drivers/serial/serial_core.c
===================================================================
--- linux.orig/drivers/serial/serial_core.c
+++ linux/drivers/serial/serial_core.c
@@ -1241,7 +1241,7 @@ static void uart_close(struct tty_struct
struct uart_state *state = tty->driver_data;
struct uart_port *port;
- BUG_ON(!kernel_locked());
+// BUG_ON(!kernel_locked());
if (!state || !state->port)
return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists