Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1765973ima; Thu, 25 Oct 2018 04:44:39 -0700 (PDT) X-Google-Smtp-Source: AJdET5fDUdwis+yj6I3oyDUWcdJ5jRTVbOdCb3N4b1UxT3Z4XqguLY53kexcWCj7gChFu/zWeXjm X-Received: by 2002:a17:902:708b:: with SMTP id z11-v6mr1221008plk.151.1540467878951; Thu, 25 Oct 2018 04:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540467878; cv=none; d=google.com; s=arc-20160816; b=eTLiJuKc//RALksHlt+y2JFcfisCT7DwixXuiP0XaXAvC10djnugBCNA6TK/VNaRBl 3Gb1ZxujiZuxf/4kY1zeXbFSQPRpdGsgKvg/brJozczMamxcODImghI0JLkIKNUAUieY PsZ0xDSqwdh0UEHk14PDp5VEt6ECLizTr+tqZlB1JQWcyvamiFHj+IP8KcEkdapHXPl1 8sB8m5qquvG2xln/6icZbZV0hPH8Af7pvGcr8o8l2M4oRCJXUaJWm6nIMkfILCz2apqn t6Iz4hbfpXPyGvgFT0GIJUpZC15vef/NCn62jRnBz4mIJ3UP5kk8mAjlX7q6QUeuK3vx DP2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=vA1MywUgG8/7g/S3QpWZB8CSc54znBHGFoDrM0Dl8O4=; b=HrJ7x/zsHG/8vhyRoXpHoqWl64xizyfaOhZawsb302wzHGjknbtMI6s13XNTFcV+RG H/3fltTL2c3O8LyztLkvphOGCQ1eq3mgVGa4CxcHB0qTDkiPED5pqzERMyy5K+4Sfx4T 5irxhpSqUqC+Nv8p34ZEj6l+Dfy3qlH1GRqRg7N4VYKULU2yOgHOH3wMU2v/Gmbo2HY+ av0IejvtWa4GdfVifmVvhf2B/E0m/46p9YmLXUK7JB17pP2qgUank5fsaiFv96j7HtG1 n6khUkObwwq9XfRLS+zAR2fdUlMHxfIS7xcGevtGd5x1DZCdlEUOXLw/CVW1FtUpYK8C yDiQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j65-v6si7027262pge.589.2018.10.25.04.44.22; Thu, 25 Oct 2018 04:44:38 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbeJYUQQ (ORCPT + 99 others); Thu, 25 Oct 2018 16:16:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57100 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727208AbeJYUQQ (ORCPT ); Thu, 25 Oct 2018 16:16:16 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9PBdh68146592 for ; Thu, 25 Oct 2018 07:43:50 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nbbwrbyae-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Oct 2018 07:43:50 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Oct 2018 12:43:48 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 25 Oct 2018 12:43:46 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9PBhjF829556950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Oct 2018 11:43:45 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 427C352054; Thu, 25 Oct 2018 11:43:45 +0000 (GMT) Received: from mschwideX1 (unknown [9.152.212.191]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2300352051; Thu, 25 Oct 2018 11:43:45 +0000 (GMT) Date: Thu, 25 Oct 2018 13:43:44 +0200 From: Martin Schwidefsky To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: dcache endless loop in d_invalidate In-Reply-To: <20181016131528.6aac4876@mschwideX1> References: <20181016131528.6aac4876@mschwideX1> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18102511-0028-0000-0000-0000030D1DBF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18102511-0029-0000-0000-000023C93257 Message-Id: <20181025134344.75484f14@mschwideX1> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-25_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=395 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810250103 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018 13:15:28 +0200 Martin Schwidefsky wrote: > In short, this if-statement in select_collect: > > if (dentry->d_flags & DCACHE_SHRINK_LIST) { > data->found++; > } > > with assumption that "somebody else" will do the shrinking seems broken. > > Do you agree? If I am not mistaken this problem should be fixed by upstream commit 4fb4887140 "restore cond_resched() in shrink_dcache_parent()" which goes on top of ff17fa561a "d_invalidate(): unhash immediately" Due to the cond_resched() the task that set DCACHE_SHRINK_LIST for the remaining two dcache entries will be scheduled eventually. This will allow the task waiting for the deletion of these dcache entries to continue, although some CPU cycles may get wasted. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.