From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932879Ab2AITFC (ORCPT ); Mon, 9 Jan 2012 14:05:02 -0500 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:58131 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932812Ab2AITFA (ORCPT ); Mon, 9 Jan 2012 14:05:00 -0500 Date: Mon, 9 Jan 2012 14:04:50 -0500 From: Christoph Hellwig To: Linus Torvalds Cc: Al Viro , Christoph Hellwig , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mgorman@suse.de, gregkh@suse.de, akpm@linux-foundation.org, david@fromorbit.com Subject: Re: [RFC PATCH] shrink_dcache_parent() deadlock Message-ID: <20120109190450.GA26390@infradead.org> References: <87ipkl87m9.fsf@tucsk.pomaz.szeredi.hu> <20120109171639.GA9359@infradead.org> <20120109173010.GX23916@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2012 at 10:46:22AM -0800, Linus Torvalds wrote: > On Mon, Jan 9, 2012 at 10:30 AM, Linus Torvalds > wrote: > > > > Here's a TOTALLY UNTESTED rebase of just that single patch from Dave. > > Well, it boots, and the dentry cache shrinks under memory pressure. So > it's not _totally_ untested now. > > But I don't really see why it would fix Miklos' case. I think > select_parent() may still end up touching the d_lru list of something > that is on the 'dispose' list. So the patch looks like a nice cleanup, > but it seems to be independent of the issue Miklos found. > > What am I missing now? After Dave's patch select_parent isolates dentries that are going to be dropped directly to an on-stack list instead of abusing the LRU. With that scheme the trylock and retry loop in __shrink_dcache_sb goes away completely for this caller.