On Thu, 2005-09-15 at 21:20 -0400, Shailabh Nagar wrote:
> rconfigfs-ckrm-replace-seq-file.patch
> 
> Replace the use of seq_file's within CKRM core code to a custom
> version that 
> allows printfs to a buffer of limited size without having to check
> limits on 
> each printf i.e. the same kind of flexibility offered by seq_file but
> without 
> its guarantee that all printfs will get displayed. 
> 
> This change is necessary since configfs only presents a char * buffer
> for the
> input/output data to a virtual file (attribute). 
> 
> Here we rely on all I/O to RCFS virtual files being less than
> PAGE_SIZE long
> which is again a constraint imposed by configfs. For most of the
> virtual files,
> this limit is more than sufficient. But if the number of controllers
> grows 
> large or any controller outputs large amounts of stats or config
> information, 
> both input and output data could be lost.  

        Unless I misunderstood the description of the problem above, I think
this is a significant problem for our use of configfs.

        Members files such as taskclass/members on systems with large numbers
of processes with the highest possible (and hence longest string
representation) pid values present a potential problem.

        My current desktop has 172 processes running. If each of those had 10
digits and a newline then that would be 172*11 = 1892 bytes. This is a
significant fraction of the members page.

        As an absolute worst-case on a 64-bit system, if every pid between 2^31
and 1 was used this could take around 22511209025 bytes:

= number of newlines + 10*(number of 10-digit numbers less thant 2^31) +
9*(number of 9 digit numbers less  than 2^31) + ...

~ 2^31 - 2 + 10*((2^31 - 1) - sum from j = 1 to 9 of 9*10^j) + sum i = 0
to 8 of (i+1)(sum j = 1 to (i+1) of 9*(10^j) - sum j = 1 to i of
9*(10^j))

        Or roughly 21GB.

        As to what's realistic... anyone care to offer a number?

Cheers,
        -Matt



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to