Received: by 10.192.165.156 with SMTP id m28csp2224939imm; Sat, 14 Apr 2018 17:54:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx48zSJVA8VzDtVAVpdvVgkwShl1RSltho+sQa8nehlOEZydjbP98o07j4qWsNw7FHcCzH3QA X-Received: by 10.98.21.209 with SMTP id 200mr16496757pfv.232.1523753656679; Sat, 14 Apr 2018 17:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523753656; cv=none; d=google.com; s=arc-20160816; b=Jltds74EMdUevtJBCFsdv4SdKlMggjkEwPBqIKkdtziHeDKEz8Tdvq/5s3eatTn3PB +iyatFvQQkeC6Uwx3+fyCK7LHh1SH3U3SA9MtHtcI0+Vdl0BZyIWJHWqpyAPDrB3W5K4 +yDMf3P+poqeeRUTwMkeNjb8QxQZgv9Sx8aDS/xCPOiYBPSs1cco6rzwfPPGUag1MbZD aSLaPdFgohGbNRLv+PSetzEfr94kMRAbXCekGMntOrinvwC4Aokb2D1Oy5NpukMjV1n6 LFtxN/nge52iAeFUgiQqE5A0TDehcFBJu3EwkYfeXCy1qaUG6S/gwNax5d+uTL5IU1z4 j1Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=qWg6Jt3/EjbEdzjr/YaqTfx1uF9Q0goMF9qAeK7r88w=; b=fSzaW8cidS3oQvD/6qEcxW9nG01S1yUp2OyWEVzXAdx2wc8XII82BzLM7ZtkQ4hyyc EcE00gxkKLInX6KaiprEcWN/FjeSYdJQaEGXGDBr6NUdhGs6tNkfzCwOJDgziOjLMxrv rar8TBs5GWAvQm0OkTquxBU3nfIvmtjhqY/5SAEY6cK0IdLQip+18AKyG3tB1hWGF71h x/ZWs9qdFl9uG4KCVuzc0/Qj8MWlVhc8XlqcXANV/eua2FViJecXpcHQuNGFCs4N9Df2 me0QectxfBSReA1bc+JFHn9VFMYT4ETWaLV+4Kl4gw2q6PS3Nks2Vi4aDdB2umqUTd/R QStA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8-v6si8010428plp.521.2018.04.14.17.53.49; Sat, 14 Apr 2018 17:54:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbeDOAv5 (ORCPT + 99 others); Sat, 14 Apr 2018 20:51:57 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:39462 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbeDOAv4 (ORCPT ); Sat, 14 Apr 2018 20:51:56 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1f7Vsp-00027F-7H; Sun, 15 Apr 2018 00:51:13 +0000 Date: Sun, 15 Apr 2018 01:51:07 +0100 From: Al Viro To: Linus Torvalds Cc: Nikolay Borisov , Andrew Morton , Khazhismel Kumykov , linux-fsdevel , Linux Kernel Mailing List , David Rientjes , Goldwyn Rodrigues , Jeff Mahoney , Davidlohr Bueso Subject: Re: [PATCH] fs/dcache.c: re-add cond_resched() in shrink_dcache_parent() Message-ID: <20180415005056.GX30522@ZenIV.linux.org.uk> References: <20180413181350.88831-1-khazhy@google.com> <20180413202823.204377-1-khazhy@google.com> <20180413141430.2788e2562e3e24bd273fe78b@linux-foundation.org> <3362fb2d-85ff-86af-399f-698c986e46cc@suse.com> <20180414080206.GV30522@ZenIV.linux.org.uk> <20180414205846.GW30522@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.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 14, 2018 at 02:47:21PM -0700, Linus Torvalds wrote: > On Sat, Apr 14, 2018 at 1:58 PM, Al Viro wrote: > > > > That breaks d_invalidate(), unfortunately. Look at the termination > > conditions in the loop there... > > Ugh. I was going to say "but that doesn't even use select_collect()", > but yeah, detach_and_collect() calls it. > > It would be easy enough to just change the > > if (!list_empty(&data.select.dispose)) > > there to > > if (!list_empty(&data.select.found)) > > too. You would have to do the same in check_and_drop() as well, and that brings back d_invalidate()/d_invalidate() livelock we used to have. See 81be24d263db... I'm trying to put something together, but the damn thing is full of potential livelocks, unfortunately ;-/ Will send a followup once I have something resembling a sane solution...