Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754462Ab3IYRpw (ORCPT ); Wed, 25 Sep 2013 13:45:52 -0400 Received: from cobra.newdream.net ([66.33.216.30]:57037 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226Ab3IYRpu (ORCPT ); Wed, 25 Sep 2013 13:45:50 -0400 Date: Wed, 25 Sep 2013 10:45:50 -0700 (PDT) From: Sage Weil X-X-Sender: sage@cobra.newdream.net To: Milosz Tanski cc: ceph-devel@vger.kernel.org, zheng.z.yan@intel.com, dhowells@redhat.com, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ceph: hung on ceph fscache invalidate in some cases In-Reply-To: <20130925151811.GA32800@gmail.com> Message-ID: References: <20130925151811.GA32800@gmail.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2342 Lines: 68 Applied this to the ceph-client.git master branch. I'll send this upstream shortly after it gets some testing and/or any other fixes pile up. Thanks! sage On Wed, 25 Sep 2013, Milosz Tanski wrote: > In some cases I'm on my ceph client cluster I'm seeing hunk kernel tasks in > the invalidate page code path. This is due to the fact that we don't check if > the page is marked as cache before calling fscache_wait_on_page_write(). > > This is the log from the hang > > INFO: task XXXXXX:12034 blocked for more than 120 seconds. > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > ... > Call Trace: > [] schedule+0x29/0x70 > [] __fscache_wait_on_page_write+0x6d/0xb0 [fscache] > [] ? add_wait_queue+0x60/0x60 > [] ceph_invalidate_fscache_page+0x29/0x50 [ceph] > [] ceph_invalidatepage+0x70/0x190 [ceph] > [] ? delete_from_page_cache+0x5f/0x70 > [] truncate_inode_page+0x8b/0x90 > [] truncate_inode_pages_range.part.12+0x13d/0x620 > [] truncate_inode_pages_range+0x4d/0x60 > [] truncate_inode_pages+0x15/0x20 > [] evict+0x1a6/0x1b0 > [] iput+0x103/0x190 > ... > > Signed-off-by: Milosz Tanski > --- > fs/ceph/cache.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c > index 6bfe65e..360b622 100644 > --- a/fs/ceph/cache.c > +++ b/fs/ceph/cache.c > @@ -324,6 +324,9 @@ void ceph_invalidate_fscache_page(struct inode* inode, struct page *page) > { > struct ceph_inode_info *ci = ceph_inode(inode); > > + if (!PageFsCache(page)) > + return; > + > fscache_wait_on_page_write(ci->fscache, page); > fscache_uncache_page(ci->fscache, page); > } > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/