[lkml]   [2011]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/5] Add a sysconf syscall
On Mon, May 16, 2011 at 6:01 PM, Andi Kleen <> wrote:
>> ...and libc will start making many such calls in a row in order to retrieve
>> a dozen of such values.
> It doesn't because the user interface is sysconf(). So the user program
> just asks for it piece by piece.

Not if libc is caching known-to-be-constant-until-reboot data on the first call.

>> It's rather inefficient to return just one word.
>> Try to return more data per call.
> I considered that, but is there a concrete use case?
> I didn't want to code it up without concrete use case.

Look at recent history of having to add more syscalls
(such as signalfd/signalfd4) only because we didn't think through
how they will need to be extended.

It's likely you will need to return more than one long word
for some data, eventually. Therefore, better add struct now
than needing to add horrible hacks later in order to be able
to return an uint64_t value.


 \ /
  Last update: 2011-05-17 14:35    [W:0.109 / U:6.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site