Re: kernel oops!

From: Linus Torvalds
Date: Fri Jan 28 2005 - 15:37:10 EST




On Fri, 28 Jan 2005, ierdnah wrote:
>
> the last patch works, but the load increases very much (normally with
> 200 VPN connections I have a load of maximum 10, with this patch I have
> a load of 50-100 - after 30 min of uptime)

Yeah, that "tty_ldisc_try()" is pretty expensive, and it really would be
worth trying to get both sides of the tty at the same time, since with my
patch in place it has to get that "tty_ldisc_lock" four times (and disable
interrupts etc - twice for getting the lock, twice for releasing it).

I'm surprised that it makes _that_ much of a difference, but it sounds
like you used to be borderline on CPU usage before, and this just made it
much worse.

One option is to instead of locking both master and slave on use in the
pty side, lock both when _changing_ the ldisc instead. That's the rare
case. Much more complex, though.

Alan, any clever ideas?

Linus
-
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/