Skip to contentSkip to conversation

alloc memory for massive legacy ptys

DISCUSSION Lyre 1 participant 1 message Apr 16, 2011

lore
Share & tools
lore

Lyre

author
#0 lore raw

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.