From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758035AbdJKUrO convert rfc822-to-8bit (ORCPT ); Wed, 11 Oct 2017 16:47:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57762 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbdJKUrH (ORCPT ); Wed, 11 Oct 2017 16:47:07 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D0D65F2983 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH v4 0/6] fs/dcache: Limit # of negative dentries To: Andrew Morton Cc: Alexander Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Linus Torvalds , Jan Kara , "Paul E. McKenney" , Ingo Molnar , Miklos Szeredi , Matthew Wilcox , Larry Woodman , James Bottomley , "Wangkai (Kevin C)" References: <1505758834-1201-1-git-send-email-longman@redhat.com> <20171010155439.d8f4bc552a81290fd5bec8cd@linux-foundation.org> From: Waiman Long Organization: Red Hat Message-ID: <41d8db7e-4538-aaaf-6d65-574b5c0ffd7a@redhat.com> Date: Wed, 11 Oct 2017 16:47:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20171010155439.d8f4bc552a81290fd5bec8cd@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 11 Oct 2017 20:47:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/2017 06:54 PM, Andrew Morton wrote: > On Mon, 18 Sep 2017 14:20:28 -0400 Waiman Long wrote: > >> A rogue application can potentially create a large number of negative >> dentries in the system consuming most of the memory available even if >> memory controller is enabled to limit memory usage. This can impact >> performance of other applications running on the system. > It does seem that under these circumstances it is pretty silly of us to > reclaim useful things in order to instantiate zillions of -ve dentries. I am talking about a misbehaving program due to bug or an intentional rogue program. > > Dentries are subject to kmemcg handling. Does this not help avoid > "impacting performance of other applications"? AFAIK, the dentry kmem_cache isn't memcg aware. So memcg can't really constrain the dentry allocation. >> We have customers seeing soft lockup and unresponsive system when >> tearing down a container because of the large number of negative >> dentries accumulated during its up time that had to be cleaned up at >> exit time when the container's filesystem was unmounted. So we need >> to do something about it. > It's a somewhat separate issue, but maybe we're missing a cond_resched > somewhere? Seeing such a softlockup's output would help. > I don't have a console log. I got this information indirectly via some of our customer-facing engineers. Cheers, Longman