All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Lee <ray-lk@madrabbit.org>
To: Ihar `Philips` Filipau <thephilips@gmail.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>, linux-kernel@vger.kernel.org
Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
Date: Sat, 03 Mar 2007 15:54:59 -0800	[thread overview]
Message-ID: <45EA0AD3.9080104@madrabbit.org> (raw)
In-Reply-To: <efa6f5910703031414m7fa70bean4fa33609eb01b62@mail.gmail.com>

Ihar `Philips` Filipau wrote:
> On 3/3/07, Ray Lee <madrabbit@gmail.com> wrote:
>> On 3/3/07, Ihar `Philips` Filipau <thephilips@gmail.com> wrote:
>> > What I'm trying to get to: keep things simple. The proposed
>> > optimization by Ingo does nothing else but allowing AIO to probe file
>> > cache - if data there to go with fast path. So why not to implement
>> > what the people want - probing of cache? Because it sounds bad? But
>> > they are in fact proposing precisely that just masked with "fast
>> > threads".
>>
>>
>> Servers want to never, ever block. Not on a socket, not on a stat, not
>> on anything. (I have an embedded server I wrote that has to fork
>> internally just to watch the damn serial port signals in parallel with
>> handling network I/O, audio, and child processes that handle H323.)
>> There's a lot of things that can block out there, and it's not just
>> disk I/O.
>>
> 
> Why select/poll/epoll/friends do not work? I have programmed on both
> sides - user-space network servers and in-kernel network protocols -
> and "never blocking" thing was implemented in *nix in the times I was
> walking under table.
> 

Then you've never had to write something that watches serial port
signals. Google on TIOCMIWAIT to see what I'm talking about. The only
option for a userspace programmer to deal with that is to fork() or poll
the signals every so many milliseconds. There are probably more easy
examples, but that's the one off the top of my head that affected me.

In short, this isn't just about network IO, this isn't just about file IO.

> One can poll() more or less *any* device in system. With frigging
> exception of - right - files.

The problem is the "more or less." Say you're right, and 95% of the
system calls are either already asynchronous or non-blocking/poll()able.
One of the questions on the table is how to extend it to the last 5%.

> User-space-wise, check how squid (caching http proxy) does it: you
> have several (forked) instances to serve network requests and you have
> one/several disk I/O daemons. (So called "diskd storeio") Why? Because
> you cannot poll() file descriptors, but you can poll unix socket
> connected to diskd. If diskd blocks, squid still can serve requests.
> How threadlets are better then pool of diskd instances? All nastiness
> of shared memory set loose...

Samba/lighttpd/git want to issue dozens of stats in parallel so that the
kernel can have an opportunity to sort them better. Are you saying they
should fork() a process per stat that they want to issue in parallel?

> What I'm trying to get to. Threadlets wouldn't help existing
> single-threaded applications - what is about 95% of all applications.

Eh, I don't think that's right. Part of the reason threadlets and
syslets are on the table because it may be a more efficient way to do
AIO. And the differences between the syslet API and the current kernel
Async IO API can be abstracted away by glibc, so that today's apps that
do AIO would immediately benefit.

> What's more, as having some limited experience of kernel programming,
> I fail to see what threadlets would simplify on kernel side.

You can yank the entire separate AIO path, and just treat them as
another blocking API that syslets makes nonblocking. Immediate reduction
of code, and everybody is now using the same code paths, which means
higher test coverage and reduced maintenance cost.

This last point is really important. Even if no extra functionality
eventually makes it to userspace, this last point would still be enough
to make the powers that be consider inclusion.

Ray

  reply	other threads:[~2007-03-03 23:55 UTC|newest]

Thread overview: 277+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <efa6f5910703021120ia0b8d18ne0c806eb2e73da4c@mail.gmail.com>
     [not found] ` <20070303103427.GC22557@2ka.mipt.ru>
2007-03-03 10:58   ` [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Ihar `Philips` Filipau
2007-03-03 11:03     ` Evgeniy Polyakov
2007-03-03 11:51       ` Ihar `Philips` Filipau
2007-03-03 21:12     ` Ray Lee
2007-03-03 22:14       ` Ihar `Philips` Filipau
2007-03-03 23:54         ` Ray Lee [this message]
2007-03-04  9:33       ` Michael K. Edwards
2007-02-27 14:15 Al Boldi
  -- strict thread matches above, loose matches on Subject: below --
2007-02-27 14:15 Al Boldi
2007-02-27 19:22 ` Theodore Tso
2007-03-01 10:21 ` Pavel Machek
2007-02-25 19:11 Al Boldi
2007-02-25 19:10 Al Boldi
2007-02-22 12:27 linux
2007-02-22 13:40 ` David Miller
2007-02-22 23:52   ` linux
2007-02-21 21:13 Ingo Molnar
2007-02-21 22:46 ` Michael K. Edwards
2007-02-21 22:57   ` Ingo Molnar
2007-02-22  0:53     ` Michael K. Edwards
2007-02-22  1:33       ` Michael K. Edwards
2007-02-22  6:51       ` Ingo Molnar
2007-02-22  8:59         ` Michael K. Edwards
2007-02-21 23:03   ` Ingo Molnar
2007-02-21 23:24   ` Ingo Molnar
2007-02-22  0:55     ` Michael K. Edwards
2007-02-21 23:31   ` Ingo Molnar
2007-02-21 23:46     ` Ulrich Drepper
2007-02-22  7:40       ` Ingo Molnar
2007-02-22 11:31         ` Evgeniy Polyakov
2007-02-22 11:52           ` Arjan van de Ven
2007-02-22 12:39             ` Evgeniy Polyakov
2007-02-22 13:41               ` David Miller
2007-02-22 14:31                 ` Ingo Molnar
2007-02-22 14:47                   ` David Miller
2007-02-22 15:02                     ` Evgeniy Polyakov
2007-02-22 15:15                     ` Ingo Molnar
2007-02-22 15:29                       ` Ingo Molnar
2007-02-22 17:17                       ` David Miller
2007-02-23 11:12                         ` Ingo Molnar
2007-02-22 20:13                     ` Davide Libenzi
2007-02-22 21:30                     ` Zach Brown
2007-02-22 14:59                   ` Ingo Molnar
2007-02-22 21:42                   ` Michael K. Edwards
2007-02-22 14:53                 ` Avi Kivity
2007-02-22 12:59           ` Ingo Molnar
2007-02-22 13:32             ` Evgeniy Polyakov
2007-02-22 19:46               ` Davide Libenzi
2007-02-23 12:15                 ` Evgeniy Polyakov
2007-02-23 17:43                   ` Davide Libenzi
2007-02-23 18:01                     ` Evgeniy Polyakov
2007-02-23 20:43                       ` Davide Libenzi
2007-02-23 11:51               ` Ingo Molnar
2007-02-23 12:22                 ` Evgeniy Polyakov
2007-02-23 12:41                   ` Evgeniy Polyakov
2007-02-25 17:45                   ` Ingo Molnar
2007-02-25 18:09                     ` Evgeniy Polyakov
2007-02-25 19:04                       ` Ingo Molnar
2007-02-25 19:42                         ` Evgeniy Polyakov
2007-02-25 20:38                           ` Ingo Molnar
2007-02-26 12:39                           ` Ingo Molnar
2007-02-26 14:05                             ` Evgeniy Polyakov
2007-02-26 14:15                               ` Ingo Molnar
2007-02-26 16:55                                 ` Evgeniy Polyakov
2007-02-26 20:35                                   ` Ingo Molnar
2007-02-26 22:06                                     ` Bill Huey
2007-02-27 10:09                                     ` Evgeniy Polyakov
2007-02-27 17:13                                     ` Pavel Machek
2007-02-27  2:18                                   ` Davide Libenzi
2007-02-27 10:13                                     ` Evgeniy Polyakov
2007-02-27 16:01                                       ` Davide Libenzi
2007-02-27 16:21                                         ` Evgeniy Polyakov
2007-02-27 16:58                                           ` Eric Dumazet
2007-02-27 17:06                                             ` Evgeniy Polyakov
2007-02-27 19:20                                           ` Davide Libenzi
2007-02-26 19:47                           ` Davide Libenzi
2007-02-25 23:14                         ` Michael K. Edwards
2007-02-22 14:17             ` Suparna Bhattacharya
2007-02-22 14:36               ` Ingo Molnar
2007-02-23 14:23                 ` Suparna Bhattacharya
2007-02-22 21:24             ` Michael K. Edwards
2007-02-23  0:30               ` Alan
2007-02-23  2:47                 ` Michael K. Edwards
2007-02-23  8:31                   ` Michael K. Edwards
2007-02-23 10:22                   ` Ingo Molnar
2007-02-23 12:37                   ` Alan
2007-02-23 23:49                     ` Michael K. Edwards
2007-02-24  1:08                       ` Alan
2007-02-24  0:51                         ` Michael K. Edwards
2007-02-24  2:17                           ` Michael K. Edwards
2007-02-24  3:25                           ` Michael K. Edwards
2007-02-23 12:17               ` Ingo Molnar
2007-02-24 19:52                 ` Michael K. Edwards
2007-02-24 21:04                   ` Davide Libenzi
2007-02-24 23:01                     ` Michael K. Edwards
2007-02-25 22:44           ` Linus Torvalds
2007-02-26 13:11             ` Ingo Molnar
2007-02-26 17:37               ` Evgeniy Polyakov
2007-02-26 18:19                 ` Arjan van de Ven
2007-02-26 18:38                   ` Evgeniy Polyakov
2007-02-26 18:56                     ` Chris Friesen
2007-02-26 19:20                       ` Evgeniy Polyakov
2007-02-26 17:28             ` Evgeniy Polyakov
2007-02-26 17:57               ` Linus Torvalds
2007-02-26 18:32                 ` Evgeniy Polyakov
2007-02-26 19:22                   ` Linus Torvalds
2007-02-26 19:30                     ` Evgeniy Polyakov
2007-02-26 20:04                       ` Linus Torvalds
2007-02-27  8:09                         ` Evgeniy Polyakov
2007-02-26 19:54                 ` Ingo Molnar
2007-02-27 10:28                   ` Evgeniy Polyakov
2007-02-27 11:52                     ` Theodore Tso
2007-02-27 12:11                       ` Evgeniy Polyakov
2007-02-27 12:13                         ` Ingo Molnar
2007-02-27 12:40                           ` Evgeniy Polyakov
2007-02-28 16:14                         ` Pavel Machek
2007-03-01  8:18                           ` Evgeniy Polyakov
2007-03-01  9:26                             ` Pavel Machek
2007-03-01  9:47                               ` Evgeniy Polyakov
2007-03-01  9:54                                 ` Ingo Molnar
2007-03-01 10:59                                   ` Evgeniy Polyakov
2007-03-01 11:00                                     ` Ingo Molnar
2007-03-01 11:16                                       ` Evgeniy Polyakov
2007-03-01 11:27                                         ` Ingo Molnar
2007-03-01 11:36                                           ` Evgeniy Polyakov
2007-03-01 11:41                                         ` Ingo Molnar
2007-03-01 11:47                                           ` Ingo Molnar
2007-03-01 12:10                                             ` Evgeniy Polyakov
2007-03-01 12:43                                               ` Ingo Molnar
2007-03-01 13:01                                                 ` Evgeniy Polyakov
2007-03-01 13:11                                                   ` Ingo Molnar
2007-03-01 13:30                                                     ` Evgeniy Polyakov
2007-03-01 14:19                                                       ` Eric Dumazet
2007-03-01 14:16                                                         ` Ingo Molnar
2007-03-01 14:31                                                           ` Eric Dumazet
2007-03-01 14:27                                                             ` Ingo Molnar
2007-03-01 14:54                                                           ` Evgeniy Polyakov
2007-03-01 15:09                                                             ` Ingo Molnar
2007-03-01 15:36                                                               ` Evgeniy Polyakov
2007-03-02 10:57                                                                 ` Ingo Molnar
2007-03-02 11:48                                                                   ` Evgeniy Polyakov
2007-03-02 17:32                                                                   ` Davide Libenzi
2007-03-02 19:39                                                                     ` Ingo Molnar
2007-03-02 20:18                                                                       ` Davide Libenzi
2007-03-02 20:29                                                                         ` Ingo Molnar
2007-03-02 20:53                                                                           ` Davide Libenzi
2007-03-02 21:21                                                                             ` Michael K. Edwards
2007-03-02 21:43                                                                             ` Nicholas Miell
2007-03-03  0:52                                                                               ` Davide Libenzi
2007-03-03  1:36                                                                                 ` Nicholas Miell
2007-03-03  1:48                                                                                   ` Benjamin LaHaise
2007-03-03  2:19                                                                                   ` Davide Libenzi
2007-03-03  7:19                                                                                     ` Ingo Molnar
2007-03-03  7:20                                                                                       ` Ingo Molnar
2007-03-03  9:02                                                                                       ` Davide Libenzi
2007-03-01 19:31                                                             ` Davide Libenzi
2007-03-02  8:10                                                               ` Evgeniy Polyakov
2007-03-02 17:13                                                                 ` Davide Libenzi
2007-03-02 19:13                                                                   ` Davide Libenzi
2007-03-03 10:06                                                                   ` Evgeniy Polyakov
2007-03-03 18:46                                                                     ` Davide Libenzi
2007-03-03 20:31                                                                       ` Evgeniy Polyakov
2007-03-03 21:57                                                                         ` Davide Libenzi
2007-03-03 22:10                                                                           ` Davide Libenzi
2007-03-04 16:23                                                                           ` Kirk Kuchov
2007-03-04 17:46                                                                             ` Kyle Moffett
2007-03-05  5:23                                                                               ` Michael K. Edwards
2007-03-04 21:17                                                                             ` Davide Libenzi
2007-03-04 22:49                                                                               ` Kirk Kuchov
2007-03-04 22:57                                                                                 ` Davide Libenzi
2007-03-05  4:46                                                                                 ` Magnus Naeslund(k)
2007-03-06  8:19                                                                                 ` Pavel Machek
2007-03-07 12:02                                                                                   ` Kirk Kuchov
2007-03-07 17:26                                                                                     ` Linus Torvalds
2007-03-07 17:39                                                                                     ` Ingo Molnar
2007-03-07 18:21                                                                                       ` Kirk Kuchov
2007-03-07 18:24                                                                                         ` Jens Axboe
2007-03-07 18:32                                                                                         ` Evgeniy Polyakov
2007-03-01 12:01                                           ` Evgeniy Polyakov
2007-03-01 11:14                                     ` Eric Dumazet
2007-03-01 11:20                                       ` Evgeniy Polyakov
2007-03-01 11:28                                         ` Eric Dumazet
2007-03-01 11:47                                           ` Evgeniy Polyakov
2007-03-01 13:12                                             ` Eric Dumazet
2007-03-01 14:43                                               ` Evgeniy Polyakov
2007-03-01 14:47                                                 ` Ingo Molnar
2007-03-01 15:23                                                   ` Evgeniy Polyakov
2007-03-01 15:32                                                     ` Eric Dumazet
2007-03-01 15:41                                                       ` Eric Dumazet
2007-03-01 15:51                                                         ` Evgeniy Polyakov
2007-03-01 15:47                                                       ` Evgeniy Polyakov
2007-03-01 19:47                                                       ` Davide Libenzi
2007-03-01 14:57                                                 ` Evgeniy Polyakov
2007-03-01 12:19                                           ` Evgeniy Polyakov
2007-03-01 12:34                                     ` Ingo Molnar
2007-03-01 13:26                                       ` Evgeniy Polyakov
2007-03-01 13:32                                         ` Ingo Molnar
2007-03-01 14:24                                           ` Evgeniy Polyakov
2007-03-01 16:56                                     ` David Lang
2007-03-01 17:56                                       ` Evgeniy Polyakov
2007-03-01 18:41                                         ` David Lang
2007-03-01 19:19                                   ` Davide Libenzi
2007-03-01 10:11                                 ` Pavel Machek
2007-03-01 10:19                                   ` Ingo Molnar
2007-03-01 11:18                                   ` Evgeniy Polyakov
2007-03-02 10:27                                     ` Pavel Machek
2007-03-02 10:37                                       ` Evgeniy Polyakov
2007-03-02 10:56                                         ` Ingo Molnar
2007-03-02 11:08                                           ` Evgeniy Polyakov
2007-03-02 17:28                                             ` Davide Libenzi
2007-03-03 10:27                                               ` Evgeniy Polyakov
2007-03-01 19:24                             ` Johann Borck
2007-03-01 19:37                               ` David Lang
2007-03-01 20:34                                 ` Johann Borck
2007-02-27 12:34                       ` Ingo Molnar
2007-02-27 13:14                         ` Evgeniy Polyakov
2007-02-27 13:32                         ` Avi Kivity
2007-02-28  3:03                       ` Michael K. Edwards
2007-02-28  8:02                         ` Evgeniy Polyakov
2007-02-28 17:01                           ` Michael K. Edwards
2007-02-28 16:38                         ` Phillip Susi
2007-02-22 19:38         ` Davide Libenzi
2007-02-28  9:45           ` Ingo Molnar
2007-02-28 16:17             ` Davide Libenzi
2007-02-28 16:42               ` Linus Torvalds
2007-02-28 17:26                 ` Ingo Molnar
2007-02-28 18:22                 ` Davide Libenzi
2007-02-28 18:42                   ` Linus Torvalds
2007-02-28 18:50                     ` Davide Libenzi
2007-02-28 19:03                       ` Chris Friesen
2007-02-28 19:42                         ` Davide Libenzi
2007-03-01  8:38                           ` Evgeniy Polyakov
2007-03-01  9:28                             ` Evgeniy Polyakov
2007-02-28 23:12                 ` Ingo Molnar
2007-03-01  1:33                   ` Andrea Arcangeli
2007-03-01  9:15                     ` Evgeniy Polyakov
2007-03-01 21:27                   ` Linus Torvalds
2007-02-28 20:21               ` Ingo Molnar
2007-02-28 21:09                 ` Davide Libenzi
2007-02-28 21:23                   ` Ingo Molnar
2007-02-28 21:46                     ` Davide Libenzi
2007-02-28 22:22                       ` Ingo Molnar
2007-02-28 22:47                         ` Davide Libenzi
2007-02-22 21:23         ` Zach Brown
2007-02-22 21:32           ` Benjamin LaHaise
2007-02-22 21:44             ` Zach Brown
2007-02-22  1:04     ` Michael K. Edwards
2007-02-22  7:00       ` Ingo Molnar
2007-02-22  9:29         ` Michael K. Edwards
2007-02-22 10:01 ` Suparna Bhattacharya
2007-02-22 11:20   ` Ingo Molnar
2007-02-24 18:34 ` Evgeniy Polyakov
2007-02-25 17:23   ` Ingo Molnar
2007-02-25 17:44     ` Evgeniy Polyakov
2007-02-25 17:54       ` Ingo Molnar
2007-02-25 18:21         ` Evgeniy Polyakov
2007-02-25 18:22           ` Ingo Molnar
2007-02-25 18:37             ` Evgeniy Polyakov
2007-02-25 18:34               ` Ingo Molnar
2007-02-25 20:01                 ` Frederik Deweerdt
2007-02-25 19:21               ` Ingo Molnar
     [not found]                 ` <20070225194645.GB1353@2ka.mipt.ru>
     [not found]                   ` <20070225195308.GC15681@elte.hu>
     [not found]                     ` <Pine.LNX.4.64.0702251232350.6011@alien.or.mcafeemobile.com>
2007-02-26  8:16                       ` Ingo Molnar
2007-02-26  9:25                         ` Evgeniy Polyakov
2007-02-26  9:55                           ` Ingo Molnar
2007-02-26 10:31                             ` Ingo Molnar
2007-02-26 10:43                               ` Evgeniy Polyakov
2007-02-26 20:02                               ` Davide Libenzi
2007-02-26 10:33                             ` Evgeniy Polyakov
2007-02-26 10:35                               ` Ingo Molnar
2007-02-26 10:47                                 ` Evgeniy Polyakov
2007-02-26 12:51                                   ` Ingo Molnar
2007-02-26 16:46                                     ` Evgeniy Polyakov
2007-02-27  6:24                                       ` Ingo Molnar
2007-02-27 10:41                                         ` Evgeniy Polyakov
2007-02-27 10:49                                           ` Ingo Molnar
2007-02-25 18:25           ` Evgeniy Polyakov
2007-02-25 18:24             ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45EA0AD3.9080104@madrabbit.org \
    --to=ray-lk@madrabbit.org \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thephilips@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.