Re: AIM7 40% regression with 2.6.26-rc1

From: Zhang, Yanmin
Date: Wed May 07 2008 - 03:06:25 EST



On Wed, 2008-05-07 at 08:28 +0200, Ingo Molnar wrote:
> * Ingo Molnar <mingo@xxxxxxx> 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.
I tested it on my 8-core stoakley. The result is 4% worse than the one of pure
2.6.26-rc1. Still not good.

>
> Ingo
>
> ---------------------->
> Subject: no: tty bkl
> From: Ingo Molnar <mingo@xxxxxxx>
> Date: Wed May 07 08:21:22 CEST 2008
>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/