lkml.org 
[lkml]   [2000]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] vmfixes-2.4.0-test9-B2 - fixing deadlocks
On Wed, 27 Sep 2000, Andrea Arcangeli wrote:
> On Wed, Sep 27, 2000 at 10:11:43AM +0200, Christoph Rohland wrote:
> > I just checked one oracle system and it did not lock the memory. And I
>
> If that memory is used for I/O cache then such memory should
> released when the system runs into swap instead of swapping it
> out too (otherwise it's not cache anymore and it could be slower
> than re-reading from disk the real data in rawio).

It could also be faster. If the database spent half an hour
gathering pieces of data from all over the database, it might
be faster to keep it in one place in swap so it can be read
in again in one swoop. (I had an interesting talk about this
with a database person while at OLS)

But that's not the point. If your assertion is true, then the
database will probably be using an mlock()ed SHM region and
taking care of this itself. But this is not something the OS
should prescribe to the application.

If the OS finds that certain SHM pages are used far less than
the pages in the I/O cache, then those SHM pages should be
swapped out. The system's job is to keep the most used pages
of data in memory to minimise the amount of page faults
happening. Trying to outsmart the application shouldn't (IHMO
of course) be part of that job...

> > Customers with performance problems very often start with too little
> > memory, but they cannot upgrade until this really big job finishes :-(
> >
> > Another issue about shm swapping is interactive transactions, where
> > some users have very large contexts and go for a coffee before
> > submitting. This memory can be swapped.
>
> Agreed, that's why I said shm performance under swap is very important
> as well (I'm not understimating it).
>
> But again: if the shm contains I/O cache it should be released
> and not swapped out. Swapping out shmfs that contains I/O cache
> would be exactly like swapping out page-cache.

The OS has no business knowing what's inside that SHM page.
IF the shm contains I/O cache, maybe you're right. However,
until you know that this is the case, optimising for that
situation just doesn't make any sense.

(unless the SHM users tell you that this is the normal way
they use SHM ... but as Christoph just told us, it isn't)

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
-- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/ http://www.surriel.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.196 / U:0.892 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site