From: "Stephen C. Tweedie" <sct@redhat.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.rutgers.edu, linux-fsdevel@vger.rutgers.edu
Subject: Re: Linux Status For 2.3.x: v 2.3.43
Date: Thu, 17 Feb 2000 15:48:41 +0000 (GMT) [thread overview]
Message-ID: <14508.6233.742081.199897@dukat.scot.redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.10.10002170229060.18606-100000@weyl.math.psu.edu>
Hi,
On Thu, 17 Feb 2000 02:36:03 -0500 (EST), Alexander Viro
<viro@math.psu.edu> said:
> On Fri, 11 Feb 2000, Stephen C. Tweedie wrote:
>> There are basically three things we need to deal with.
>>
>> * Freeing memory.
>>
>> The simple one. An application wants more memory, so we need to throw
>> something out of cache.
> Probable point where we call it being shrink_mmap(). Other candidates?
shrink_mmap() is the obvious place. The biggest problem is that we will
need to export enough functionality to allow other filesystems to
hook their own data structures onto the page cache LRU list, so that
filesystem-specific caches can be reclaimed in the same shrink_mmap()
loop.
>> * Write throttling.
>>
>> There needs to be a way of detecting when we have too many dirty pages
>> in memory so that we can stall new write activity while we go about
>> flushing some old writes to disk. ...
> Ahem... OK, we can put the counter for dirty pages and put them into the
> head of the ->pages.
Think about the buffer cache too. But yes, if we restrict this to page
cache pages, then a page dirty bit and a separate lru for those pages
will do for this.
>> * Pinned memory thresholds.
>>
>> Some filesystems create pages which simply cannot be flushed to disk
>> on demand.
...
>> There _must_ be a hard, system-wide limit on such pinned pages, so
>> that we can guarantee that when we do want to flush pinned pages,
>> there is enough unpinned memory available to the page stealer to allow
>> the fs transactions to complete and the pinned pages to be released.
> Ouch. Now, that may turn out nasty - deadlocks are fun...
The whole reason we need this is to avoid deadlocks. If we don't have
it, we can deadlock if we have transactional filesystems --- it's pretty
much that simple. It's not enough to detect deadlocks here, we really
do need to prevent them, and allowing for pre-reservation of pinned
pages is the simplest way to let that happen.
> OK, let's do the simple stuff first - are you OK with per-address_space
> -> shrink_mapping() being called from shrink_mmap()?
Absolutely.
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
parent reply other threads:[~2000-02-17 16:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <Pine.GSO.4.10.10002170229060.18606-100000@weyl.math.psu.edu>]
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=14508.6233.742081.199897@dukat.scot.redhat.com \
--to=sct@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-fsdevel@vger.rutgers.edu \
--cc=linux-kernel@vger.rutgers.edu \
--cc=viro@math.psu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®