devfs
[Top] [All Lists]

Re: # of pty entries under /dev

To: "Luo, Ling" <Ling.Luo@xxxxxxxxxxxxx>
Subject: Re: # of pty entries under /dev
From: Pavel Roskin <proski@xxxxxxx>
Date: Thu, 6 Jun 2002 11:30:24 -0400 (EDT)
Cc: devfs@xxxxxxxxxxx
In-reply-to: <F124A4236064D211859A0008C74CE35D027E33D8@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
Hello!

> I saw the following links /dev/ptya(0-f), /dev/ptyb(0-f) etc pointing to
> /dev/pty/m0--m255.
> Since I don't need that many ptys, try to shrink down the entries under
> /dev. but changing kernel configurations CONFIG_UNIX98_PTY_COUNT from
> default 256 to 10 does not change the number of  /dev pty entries, it still
> has 256 of them.
> CONFIG_DEVPTS_FS is not enabled ( devfs readme indicates some problem of
> having both devpts and devfs enabled, so I just disabled devpts). Even
> enabling CONFIG_DEVPTS_FS did not make a difference in this case.

Read the sources.  From include/linux/tty.h:

#define NR_PTYS         256     /* ptys/major */ 
...
/* 
 * Unix98 PTY's can be defined as any multiple of NR_PTYS up to 
 * UNIX98_PTY_MAJOR_COUNT; this section defines what we need from the 
 * config options 
 */

You can try reducing NR_PTYS.  Actually, it would be nice to make it 
possible to disable old-style pty's alltogether.  The patch should be 
quite simple.

-- 
Regards,
Pavel Roskin


<Prev in Thread] Current Thread [Next in Thread>