Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Tuesday, November 20, 2007 - 4:41 pm

* H. Peter Anvin <hpa@zytor.com> wrote:


i think you are at least partly wrong here. Multiplexing/demultiplexing 
can go on infinitely - for example sys_write(fd, size, buf) can be 
thought of as a function call that passes in fd, size and a variable 
number of arguments of the data to be written.

in that sense capping function arguments at 6 is _sensible_ because it 
prefers _simple_ interfaces. When i wrote syslets i did a syscall number 
of arguments histogram:

  #args   #syscalls
  -----------------
      0       22
      1       51
      2       83
      3       85
      4       40
      5       23
      6        8


Fortunately what we see today is that 80% of all syscalls have 4 or less 
parameters. (yes, there are a few 6-parameter syscalls that arguably 
hurt, but still, it's the exception not the rule)

this histogram shows a healthy bell curve which is _not_ limited by the 
arguments limit of 6, but by common sense! If the 6-arguments limit was 
a problem then we'd see a pile-up of 6-param syscalls.

so i believe you should start thinking about lots-of-arguments syscalls 
as an exception not as something that needs to fit into some generic 
ABI. (Especially as most schemes that were supposed to handle this 
problem would hurt the sane 4-parameter (or less) syscall case too.)

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets, Ulrich Drepper, (Mon Nov 19, 11:53 pm)
Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new so ..., Ingo Molnar, (Tue Nov 20, 4:41 pm)