From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
Mel Gorman <mel@linux.vnet.ibm.com>,
Dave Chinner <david@fromorbit.com>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
Minchan Kim <minchan.kim@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock
Date: Wed, 27 Apr 2011 10:34:04 +0800 [thread overview]
Message-ID: <20110427023404.GA5821@localhost> (raw)
In-Reply-To: <20110426144209.06317674.akpm@linux-foundation.org>
On Wed, Apr 27, 2011 at 05:42:09AM +0800, Andrew Morton wrote:
> On Tue, 26 Apr 2011 22:42:19 +0800
> Wu Fengguang <fengguang.wu@intel.com> wrote:
>
> > @@ -55,13 +55,16 @@ EXPORT_SYMBOL(I_BDEV);
> > static void bdev_inode_switch_bdi(struct inode *inode,
> > struct backing_dev_info *dst)
> > {
> > - spin_lock(&inode_wb_list_lock);
> > + struct backing_dev_info *old = inode->i_data.backing_dev_info;
> > +
> > + bdi_lock_two(&old->wb, &dst->wb);
> > spin_lock(&inode->i_lock);
> > inode->i_data.backing_dev_info = dst;
> > if (inode->i_state & I_DIRTY)
> > list_move(&inode->i_wb_list, &dst->wb.b_dirty);
> > spin_unlock(&inode->i_lock);
> > - spin_unlock(&inode_wb_list_lock);
> > + spin_unlock(&old->wb.list_lock);
> > + spin_unlock(&dst->wb.list_lock);
> > }
>
> Has this patch been well tested under lockdep?
Yes, it runs OK on concurrent dd and dd+tar workloads over all major
filesystems, including NFS. Lockdep is always enabled in my kernels,
no warnings are found in dmesg.
Thanks,
Fengguang
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
Mel Gorman <mel@linux.vnet.ibm.com>,
Dave Chinner <david@fromorbit.com>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
Itaru Kitayama <kitayama@cl.bb4u.ne.jp>,
Minchan Kim <minchan.kim@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock
Date: Wed, 27 Apr 2011 10:34:04 +0800 [thread overview]
Message-ID: <20110427023404.GA5821@localhost> (raw)
In-Reply-To: <20110426144209.06317674.akpm@linux-foundation.org>
On Wed, Apr 27, 2011 at 05:42:09AM +0800, Andrew Morton wrote:
> On Tue, 26 Apr 2011 22:42:19 +0800
> Wu Fengguang <fengguang.wu@intel.com> wrote:
>
> > @@ -55,13 +55,16 @@ EXPORT_SYMBOL(I_BDEV);
> > static void bdev_inode_switch_bdi(struct inode *inode,
> > struct backing_dev_info *dst)
> > {
> > - spin_lock(&inode_wb_list_lock);
> > + struct backing_dev_info *old = inode->i_data.backing_dev_info;
> > +
> > + bdi_lock_two(&old->wb, &dst->wb);
> > spin_lock(&inode->i_lock);
> > inode->i_data.backing_dev_info = dst;
> > if (inode->i_state & I_DIRTY)
> > list_move(&inode->i_wb_list, &dst->wb.b_dirty);
> > spin_unlock(&inode->i_lock);
> > - spin_unlock(&inode_wb_list_lock);
> > + spin_unlock(&old->wb.list_lock);
> > + spin_unlock(&dst->wb.list_lock);
> > }
>
> Has this patch been well tested under lockdep?
Yes, it runs OK on concurrent dd and dd+tar workloads over all major
filesystems, including NFS. Lockdep is always enabled in my kernels,
no warnings are found in dmesg.
Thanks,
Fengguang
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-04-27 2:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 14:42 [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock Wu Fengguang
2011-04-26 14:42 ` Wu Fengguang
2011-04-26 14:44 ` [PATCH 2/2] writeback: elevate queue_io() into wb_writeback() Wu Fengguang
2011-04-26 14:44 ` Wu Fengguang
2011-05-04 11:08 ` Christoph Hellwig
2011-05-04 11:08 ` Christoph Hellwig
2011-05-04 11:15 ` Wu Fengguang
2011-05-04 11:15 ` Wu Fengguang
2011-05-04 11:17 ` Christoph Hellwig
2011-05-04 11:17 ` Christoph Hellwig
2011-04-26 21:42 ` [PATCH 1/2] split inode_wb_list_lock into bdi_writeback.list_lock Andrew Morton
2011-04-26 21:42 ` Andrew Morton
2011-04-27 2:34 ` Wu Fengguang [this message]
2011-04-27 2:34 ` Wu Fengguang
2011-04-27 6:06 ` Christoph Hellwig
2011-04-27 6:06 ` Christoph Hellwig
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=20110427023404.GA5821@localhost \
--to=fengguang.wu@intel.com \
--cc=Trond.Myklebust@netapp.com \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=kitayama@cl.bb4u.ne.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@linux.vnet.ibm.com \
--cc=minchan.kim@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.