alloc memory for massive legacy ptys

From: Lyre
Date: Sat Apr 16 2011 - 04:06:52 EST


Hi all:

In a rare condition, I need to alloc massive legacy ptys on SLES 9 SP4,
kernel 2.6.5-7.308-smp.

I noticed the limit number of legacy ptys was 10922, due to the kmalloc
128kb limit. 10922 * 3 * sizeof (void *) was 8 bytes lesser than 128kb
on 32bit system.

I tried to use vmalloc instead of kmalloc in tty_register_driver(). My
system was able to boot, but I'm not sure if it was safely to do this,
since vmalloc don't guarant the phy memory were contiguous, and I don't
know the pty driver memory requirements neither.
--
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/