From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
netdev@vger.kernel.org, trond.myklebust@fys.uio.no,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 22/28] mm: add support for non block device backed swap files
Date: Tue, 26 Feb 2008 13:58:03 +0100 [thread overview]
Message-ID: <1204030683.6242.319.camel@lappy> (raw)
In-Reply-To: <E1JTzBV-0001aO-R3@pomaz-ex.szeredi.hu>
On Tue, 2008-02-26 at 13:45 +0100, Miklos Szeredi wrote:
> Starting review in the middle, because this is the part I'm most
> familiar with.
>
> > New addres_space_operations methods are added:
> > int swapfile(struct address_space *, int);
>
> Separate ->swapon() and ->swapoff() methods would be so much cleaner IMO.
I'm ok with that, but its a_ops bloat, do we care about that? I guess
since it has limited instances - typically one per filesystem - there is
no issue here.
> Also is there a reason why 'struct file *' cannot be supplied to these
> functions?
No real reason here. I guess its cleaner indeed. Thanks.
> > +int swap_set_page_dirty(struct page *page)
> > +{
> > + struct swap_info_struct *sis = page_swap_info(page);
> > +
> > + if (sis->flags & SWP_FILE) {
> > + const struct address_space_operations *a_ops =
> > + sis->swap_file->f_mapping->a_ops;
> > + int (*spd)(struct page *) = a_ops->set_page_dirty;
> > +#ifdef CONFIG_BLOCK
> > + if (!spd)
> > + spd = __set_page_dirty_buffers;
> > +#endif
>
> This ifdef is not really needed. Just require ->set_page_dirty() be
> filled in by filesystems which want swapfiles (and others too, in the
> longer term, the fallback is just historical crud).
Agreed. This is a good motivation to clean up that stuff.
> Here's an incremental patch addressing these issues and beautifying
> the new code.
Thanks, I'll fold it into the patch and update the documentation. I'll
put your creds in akpm style.
prev parent reply other threads:[~2008-02-26 12:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080220144610.548202000@chello.nl>
[not found] ` <20080220150308.142619000@chello.nl>
2008-02-26 12:45 ` [PATCH 22/28] mm: add support for non block device backed swap files Miklos Szeredi
2008-02-26 12:58 ` Peter Zijlstra [this message]
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=1204030683.6242.319.camel@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trond.myklebust@fys.uio.no \
/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