Re: Analogue of Windows I/O completion ports on Linux?
From: David Schwartz (davids_at_webmaster.com)
Date: 09/27/05
- Next message: Perianayagam Somasundaram: "2.4.31 hanging after uncompression"
- Previous message: Sibi: "Re: Freeblock Scheduler in Linux?"
- In reply to: Peter T. Breuer: "Re: Analogue of Windows I/O completion ports on Linux?"
- Next in thread: stork_at_storkyak.com: "Re: Analogue of Windows I/O completion ports on Linux?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Sep 2005 21:33:15 -0700
"Peter T. Breuer" <ptb@oboe.it.uc3m.es> wrote in message
news:5a6m03-ivv.ln1@news.it.uc3m.es...
>> There's really no good way to lock in pages that haven't faulted in
>> yet.
> Eh? That's not at issue! The idea is to lock in those pages that HAVE
> faulted in!
How does that help if the page you need to lock in hasn't faulted in
yet?
> Oh .. maybe you phrased that a little off. I think you mean
> that there's no good way to eagerly fault in all pages that you will
> ever want at startup, in order that they be locked in ram and thus
> avaialble for when you need them.
Right. You can't avoid page faults during execution, so you have to
minimize the problems they cause.
>> It depends upon a lot of complicated factors included how much right your
>> application has to hog resources. Obviously, if you're the only important
>> application on the system, go right ahead.
> He thinks he is.
> I have some daemons locked in ram that need to do a tight loop
> servicing calls to and from the kernel. Swapping them out would be
> nasty, but the inner loop is all hat they really need.
Until something unusual happens that requires code other than the inner
loop.
>> However, I have hear the complaint that systems work perfectly fine
>> on
>> test harnesses and handle huge load. But then when they're tested in the
>> real world, they get bursty and sometimes fall victim to lag from which
>> they
>> cannot catch up.
>> The problem is that the test code is repeating the same bits of
>> operations, so they stay hot in the processor caches and in memory. Then
>> real world clients hit infrequently used code that has to be faulted in
>> or
> Well, one can't force stuff into memory when it's not known what it
> will be! Goedel's theorem, and all that. All you can do is keep some
> memory available so that nothing else has to be swapped out when the
> time comes. How you do that is definitely tricky .. I agree.
Right, that's why I don't generally recommend a single thread in a
'select' loop as a design model for servers. There are, of course, some
cases where it's the best approach. But that's not common.
>> I do not recommend this design. (Non-blocking I/O with 'select' in a
>> single thread.)
> I imagine the daemons exercise a sumple service cycle. It should all be
> there when it's needed.
Sooner or later you'll need to do something that can fault that's not
easily avoidable. Consider reading a file.
DS
- Next message: Perianayagam Somasundaram: "2.4.31 hanging after uncompression"
- Previous message: Sibi: "Re: Freeblock Scheduler in Linux?"
- In reply to: Peter T. Breuer: "Re: Analogue of Windows I/O completion ports on Linux?"
- Next in thread: stork_at_storkyak.com: "Re: Analogue of Windows I/O completion ports on Linux?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|