From: Rik van Riel <riel@conectiva.com.br>
To: Andreas Bombe <andreas.bombe@munich.netsurf.de>
Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: Best way to extend try_to_free_pages()?
Date: Tue, 16 May 2000 20:46:51 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0005162041530.32026-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <20000517005828.A3028@storm.local>
On Wed, 17 May 2000, Andreas Bombe wrote:
> (not possible, since 1394 code can be modularized)? If not, I
> consider adding some generic code to register callbacks for low
> memory situations as soon as I need it.
A callback system from do_try_to_free_pages(), where anybody
can dynamically register their cache->drop_pages() function
would be nice.
Maybe a list of caches with function pointers?
spin_lock(&cachelist_lock);
for (cache = &cachelist.next ; cache->next != &cachelist ;
cache = cachelist->next) {
count -= cache->drop_pages(priority);
if (count <= 0)
break;
}
spin_unlock(&cachelist_lock);
On module load time, init_module() could grab the cachelist_lock,
insert an entry in the list and next time try_to_free_pages() is
called our cache will be shrunk too.
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next parent reply other threads:[~2000-05-16 23:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20000517005828.A3028@storm.local>
2000-05-16 23:46 ` Rik van Riel [this message]
2000-05-17 1:51 frankeh
2000-05-17 8:08 ` Stephen C. Tweedie
2000-05-17 9:44 ` Trond Myklebust
2000-05-17 10:48 ` Stephen C. Tweedie
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=Pine.LNX.4.21.0005162041530.32026-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=andreas.bombe@munich.netsurf.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
/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