Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2231781ybb; Thu, 2 Apr 2020 16:06:11 -0700 (PDT) X-Google-Smtp-Source: APiQypIXsP+ZD6MUW0N3FfDPzWcHt2o9OYuVvs8j57XNiO1kqK+evly0SquED9Oz5NgMnXlQU/5Q X-Received: by 2002:a4a:4190:: with SMTP id x138mr4609616ooa.35.1585868771020; Thu, 02 Apr 2020 16:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585868771; cv=none; d=google.com; s=arc-20160816; b=oIi9TGeoTlTm2JxGjrFYcAmC3KBvnj7Qqmm+P9WqqkbauR9WPTdY5wm+nLl65ipNw+ b510bniPjBqz4IrXKQFcPiUZruNJV36lOns9K+WxZE5rTU9B2DYMcNrSigePY1v91LXM 35ImbLBYr0+v0EvJCqPY9rktn5nyTXWI6iEMmxrRPCShpQ7yO7Nw5/Ec94MBc8p0e3G8 7L1Y37m9INlU799Oqc/faCdxH36Wxoa3N2SqljKWjAZmlv+H845OD/QSujpouXu8dhc6 VgS0+Q5sdTOM/Cv8dl10G0yHt+OI+Et2sxCmpnpd3YHiawPxAv87iahnVfJfeN5rNirm L4WA== 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; bh=BzlYfWPfjVLLViKroV5Bj/wWdp/CwSXppVCjZgXhNqQ=; b=1JjXlA6fk+ilPxgIr9VwmsuJHQMmDWh/KLl5UPDimM8ICvIUKy1dL/5Kj7EvvMk2aa lK5IaNjgO04n1tXEN+DnrdBtFMeXGbaEUp5iDiB1xJAEbpRN+0LIPh09vTyILe1hVxwE 4xRZY6hAo6qAmqvwVb3Md47KohzMDhlX8XiOVcKGHixyrl9odJbFsPIExDOVH+7AuLuP 2APTsC/a3ozri4KuJbYqsiF8bhv2FdJWQm0mJyslP1UTNsC4wW9uTtSDhe4O8LIYsh8Y lmBXXrbANdjCn/VQfq/IfG14KeZCl+iEvhOaAO4x+rBhBeBTsdN2qz5mF1URVQxKHcl3 ELSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=BnveTbzR; 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 t8si2748929ood.64.2020.04.02.16.05.52; Thu, 02 Apr 2020 16:06:11 -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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=BnveTbzR; 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 S2390134AbgDBXEG (ORCPT + 99 others); Thu, 2 Apr 2020 19:04:06 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:54716 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729549AbgDBXEG (ORCPT ); Thu, 2 Apr 2020 19:04:06 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 032MsjJM108362; Thu, 2 Apr 2020 23:03:54 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-2020-01-29; bh=BzlYfWPfjVLLViKroV5Bj/wWdp/CwSXppVCjZgXhNqQ=; b=BnveTbzR3ITbMbCPydFkAjSvvZUI4aHmZCki96ZoMIzopayt4MNwouLsqnMN+2qo5Ka1 aAT4ncKFtb3wqJJwoq02Gtn48bxPbLGMB5IQxH1epEEtozIxZUYYwJ3IUx6ESG0oaV4S 0HU/NBhnhWb9D+r61yvkTn5/0KKGGBwdXnEwpK11T3GbqKVNXy4VxXenGtetM0dSWaNv XDiHigag8026jNcI4gJj4eNY7BH+z2/EcQVN1pKyBKQmfIcpSH7Eqn+TqCa7WX1LdQPv NEAY4pa1X3l+tCTDCqjJBECfZ31D+icT7RoKtYtHdhOZEq01jIWYZR1AoPhgq0jltJs/ mA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 303yungusu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Apr 2020 23:03:54 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 032Mq9ed076063; Thu, 2 Apr 2020 23:03:54 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 302ga3a6k0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Apr 2020 23:03:53 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 032N3qvW029087; Thu, 2 Apr 2020 23:03:52 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Apr 2020 16:03:51 -0700 Date: Thu, 2 Apr 2020 19:04:11 -0400 From: Daniel Jordan To: Yang Shi Cc: kirill.shutemov@linux.intel.com, hughd@google.com, aarcange@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: thp: don't need drain lru cache when splitting and mlocking THP Message-ID: <20200402230411.7ckwkmd6wwtqfkm2@ca-dmjordan1.us.oracle.com> References: <1585337380-97368-1-git-send-email-yang.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1585337380-97368-1-git-send-email-yang.shi@linux.alibaba.com> User-Agent: NeoMutt/20180716 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9579 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxlogscore=929 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004020169 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9579 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=994 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 impostorscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004020169 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2020 at 03:29:40AM +0800, Yang Shi wrote: > Since the commit 8f182270dfec ("mm/swap.c: flush lru pvecs on compound > page arrival") THP would not stay in pagevec anymore. So the > optimization made by commit d965432234db ("thp: increase > split_huge_page() success rate") doesn't make sense anymore, which tries > to unpin munlocked THPs from pagevec by draining pagevec. > > And draining lru cache before isolating THP in mlock path is unnecessary > either. Can we get some of that nice history in this part too? Draining lru cache before isolating THP in mlock path is also unnecessary. b676b293fb48 ("mm, thp: fix mapped pages avoiding unevictable list on mlock") added it and 9a73f61bdb8a ("thp, mlock: do not mlock PTE-mapped file huge pages") accidentally carried it over after the above optimization went in. > Cc: Kirill A. Shutemov > Cc: Hugh Dickins > Cc: Andrea Arcangeli > Signed-off-by: Yang Shi Since we don't mlock pte-mapped THP, it seems these huge pages wouldn't ever be in the pagevecs if I'm understanding it all. Saves lines and some amount of overhead and lru contention, so looks good. Reviewed-by: Daniel Jordan