Re: Analogue of Windows I/O completion ports on Linux?

From: David Schwartz (davids_at_webmaster.com)
Date: 09/26/05


Date: Mon, 26 Sep 2005 13:27:08 -0700


"Peter T. Breuer" <ptb@oboe.it.uc3m.es> wrote in message
news:o5ug03-v1l.ln1@news.it.uc3m.es...

>> Oh god no. All that has to happen is one client does something
>> unusual
>> that requires you to fault in some code that hasn't run yet or has been
>> oppurtunistically paged out.

> Well, you could lock the process in memory, then! If you can't afford
> to swap it, you can't swap it.

    There's really no good way to lock in pages that haven't faulted in yet.
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.

    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
that was oppurtunistically paged out. Coupled with other design factors,
this can cause real world performance to be much less than it should be.

    I do not recommend this design. (Non-blocking I/O with 'select' in a
single thread.)

    DS



Relevant Pages

  • Re: remove-stale-comment-from-swapfilec.patch added to -mm tree
    ... avoiding the second fault which would follow). ... The idea in my mind is that after loading the page from swap the first time ... > because the user process is not faulting the page in (referencing it), ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: syncer panic
    ... Losing your swap partition can have disastrous ... I figure my uptime is dire at the moment due to panics, ... page fault while in kernel mode ... ad0: error executing commandata0: resetting devices .. ...
    (freebsd-current)
  • Re: remove-stale-comment-from-swapfilec.patch added to -mm tree
    ... avoiding the second fault which would follow). ... > The idea in my mind is that after loading the page from swap the first time ... We always prefer not to read from the disk. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Analogue of Windows I/O completion ports on Linux?
    ... >> that requires you to fault in some code that hasn't run yet or has been ... > to swap it, you can't swap it. ... they get bursty and sometimes fall victim to lag from which they ...
    (comp.os.linux.development.apps)
  • Re: locking user space memory in kernel
    ... >>the swap out. ... >>soft page fault, but the physical address won't change. ... >into the buffer and then notify the user that the buffer now contains ... cache lookup and finds the original physical page in memory and maps it ...
    (Linux-Kernel)