From: "Jörn Engel" <joern@logfs.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>,
"Robert P. J. Day" <rpjday@crashcourse.ca>,
linux-mm@kvack.org
Subject: Re: why are some low-level MM routines being exported?
Date: Mon, 5 Apr 2010 07:30:26 +0200 [thread overview]
Message-ID: <20100405053026.GA23515@logfs.org> (raw)
In-Reply-To: <p2g28c262361004041759n52f5063dhb182663321d918bb@mail.gmail.com>
On Mon, 5 April 2010 09:59:18 +0900, Minchan Kim wrote:
> On Mon, Apr 5, 2010 at 4:55 AM, JA?rn Engel <joern@logfs.org> wrote:
> > On Mon, 5 April 2010 01:21:52 +0900, Minchan Kim wrote:
> >> >
> >> Until now, other file system don't need it.
> >> Why do you need?
> >
> > To avoid deadlocks. A You tell logfs to write out some locked page, logfs
> > determines that it needs to run garbage collection first. A Garbage
> > collection can read any page. A If it called find_or_create_page() for
> > the locked page, you have a deadlock.
>
> Could you do it with add_to_page_cache and pagevec_lru_add_file?
Maybe. But how would that be an improvement?
As I see it, logfs needs a variant of find_or_create_page() that does
not block on any pages waiting for logfs GC. Currently that variant
lives under fs/logfs/ and uses add_to_page_cache_lru(). If there are
valid reasons against exporting add_to_page_cache_lru(), the right
solution is to move the logfs variant to mm/, not to rewrite it.
If you want to change the implementation from using
add_to_page_cache_lru() to using add_to_page_cache() and
pagevec_lru_add_file(), then you should have a better reason than not
exporting add_to_page_cache_lru(). If the new implementation was any
better, I would gladly take it.
JA?rn
--
Money can buy bandwidth, but latency is forever.
-- John R. Mashey
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-04-05 5:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 15:27 why are some low-level MM routines being exported? Robert P. J. Day
2010-04-04 15:59 ` Minchan Kim
2010-04-04 16:03 ` Evgeniy Polyakov
2010-04-04 16:17 ` Minchan Kim
2010-04-04 16:21 ` Minchan Kim
2010-04-04 18:15 ` Evgeniy Polyakov
2010-04-05 0:36 ` Minchan Kim
2010-04-05 12:47 ` Evgeniy Polyakov
2010-04-05 14:31 ` Minchan Kim
2010-04-04 19:55 ` Jörn Engel
2010-04-05 0:59 ` Minchan Kim
2010-04-05 5:30 ` Jörn Engel [this message]
2010-04-05 6:20 ` Minchan Kim
2010-04-05 6:22 ` Minchan Kim
2010-04-05 7:13 ` Jörn Engel
2010-04-05 8:26 ` Minchan Kim
2010-04-05 11:19 ` Jörn Engel
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=20100405053026.GA23515@logfs.org \
--to=joern@logfs.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=rpjday@crashcourse.ca \
--cc=zbr@ioremap.net \
/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;
as well as URLs for NNTP newsgroup(s).