Received: by 10.223.185.116 with SMTP id b49csp2929184wrg; Mon, 5 Mar 2018 10:55:59 -0800 (PST) X-Google-Smtp-Source: AG47ELt7HWT69ZIEfFDopl79/v8aEWSUUkgnC3e3jNN+47JKyAZ/aMeDhXWMpOaueGGx8+sIBGRl X-Received: by 2002:a17:902:ab89:: with SMTP id f9-v6mr13838607plr.369.1520276159226; Mon, 05 Mar 2018 10:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520276159; cv=none; d=google.com; s=arc-20160816; b=foDE1rPIM2YQibiDR788dR0B+HnUNU9RzMgv9kLWD4VvvZvAwpc/TFG5kYWpNrDJaR 9KCRq9m5BoKJo7GEbmPwyph5OKyOvIAFaIj1oH08J4npT+Ay4HY8nF9ud/CO5dDqJ4uC 2kzTklq4epJLNypinXKQsSyIjFmEpc8qCu5ZLpGgnMRINFI7Swd1N1RHHn3Fg1fQkpiw Jorw1UOfC7/aloySLH9P2kuw18Bmh8w2JD08o+6II3wgkby28ys6PaeHRyMb7ZTap6rk UjU9Q1ErUNtRTKC9nhzLoCc7aYtezaJnqlnM2PNyr8/by/SgDPCnC8tWIatFv60s4J9T Qsmg== 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:dkim-signature:arc-authentication-results; bh=iUh0sZi0ecYk8n/R1NHCeEf2Y/EmpewyEyIxfkVTM5s=; b=FcXeg8abS5tRKyZUvmLwDSq/MmGiI6qtXPrcKAnM1HGdwFY1SrCZ+PuIv3WvuaIeN5 uSbD0U+ihB58Peo1mwmT7ZLYKP+igcL5bPheIR9p8aTy+59G8cjFyyzCk6yCmCpQPcFg oZutxo7gga7eHUgf/5kcdNcXCCmEWTHAanmWEwc9kOCh1XGmBGdd6DXCe49k7waIpVo0 MYsmO94ZP+9H02lK7+dUFExZJY77kJpcpc2BSALH7hloQd2Sz1EsNOyn6eMv3S+89ise UUB3B6oF/qB5u3Wnuexk+DEvI7o/7t0XjFUZ5Gyel5seGouZWhSooYHw6S27uIQJSxe9 pYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=TSlPIlXs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63-v6si9692006plb.356.2018.03.05.10.55.45; Mon, 05 Mar 2018 10:55:59 -0800 (PST) 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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=TSlPIlXs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbeCESxI (ORCPT + 99 others); Mon, 5 Mar 2018 13:53:08 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:57656 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbeCESxG (ORCPT ); Mon, 5 Mar 2018 13:53:06 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w25IlNWZ186725; Mon, 5 Mar 2018 18:53:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=iUh0sZi0ecYk8n/R1NHCeEf2Y/EmpewyEyIxfkVTM5s=; b=TSlPIlXsu/5Gmgx3WWcuHnp3eLQYkT8YfJfi9IQkpqgSXTYW3gNlgj1Jv4tGTvcMv5Eo qGNu/G3LYNKBMO7R3y3nkU9meAqSeEgq1GwoTpM2C8PsHZd9hl1i0Kvzm2/VsIL22YbH 36RobLCjHMI+ZJaR2HEX24WPqNFhj6cWekuRmxAXH0/v+yGuOpYkxOpbJbm1dRrUuU09 x5tKNgAOGU9mQzfbISjFD6yM1Fkkj/GJcsdCliJwtrNwYVfBevdnTzpE0fgSzZY8IWL/ 2KI4lTF8k3Lkig9JT8fUIPo1PBTdycVCmXcbcr2RX1J6WBl5xxU6+q1c0yhC6xIwRuJ0 pw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2gh9j2rpft-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Mar 2018 18:53:02 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w25Ir1no023539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Mar 2018 18:53:01 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w25Ir1Wm029747; Mon, 5 Mar 2018 18:53:01 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 10:53:00 -0800 Date: Mon, 5 Mar 2018 10:52:59 -0800 From: "Darrick J. Wong" To: Vratislav Bendel Cc: linux-xfs@vger.kernel.org, Brian Foster , linux-kernel@vger.kernel.org, djwong@kernel.org Subject: Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic Message-ID: <20180305185259.GC18989@magnolia> References: <20180228154951.31714-1-vbendel@redhat.com> <20180301224800.GI12763@magnolia> <20180302163603.GQ19312@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803050217 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 05, 2018 at 11:19:46AM +0100, Vratislav Bendel wrote: > (In response to Luis' comment:) > > Can you add a respective Fixes: tag? > > It was apparently present since LRU was added to xfs buffer cache via: > commit 430cbeb86fdcbbdabea7d4aa65307de8de425350 > [xfs: add a lru to the XFS buffer cache] > > But I wouldn't say this patch "fixes" that commit. > What do you think? Should a fixes tag be added in this case? > > > > Also what effects are observed by > > the user when this happens on the kernel log? > > I haven't spotted any differences visible to user, nor in the kernel log. > > (In response to Brian's comment:) > >> However, as per documentation, atomic_add_unless() returns _zero_ > >> if the atomic value was originally equal to the specified *unsless* value. > >> > > Nit: unless > > Thanks very much for feedback. Since it's my very first upstream > commit-proposal, > I expected that some polish would be needed. > > > > It might be worth pointing out in the commit log that currently isolated > > buffers end up right back on the LRU once they are released, because > > ->b_lru_ref remains elevated. Therefore, this patch essentially fixes > > that circuitous route by leaving them on the LRU as originally intended. > > Otherwise this looks Ok to me: > > So the final commit message could be: > ~~~ > Currently the xfs_buftarg_isolate() is causing an xfs_buffer "Due to an inverted logic mistake in xfs_buftarg_isolate()..."? > with zero b_lru_ref, to take another trip around LRU, while ^^^^ no need for this comma > isolating buffers with non-zero b_lru_ref. > > Additionally those isolated buffers end up right back on the LRU > once they are released, because ->b_lru_ref remains elevated. > > Fix that circuitous route by leaving them on the LRU > as originally intended. Otherwise this seems fine to me; can you please resend the patch w/ updated change log and reviewed-by tags? Reviewed-by: Darrick J. Wong --D > > >> Signed-off-by: Vratislav Bendel > > Reviewed-by: Brian Foster > > --- > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html