Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1394048pxf; Fri, 19 Mar 2021 06:24:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHN8d0X+yp2Cw2V7VyYo+D4BVpastRobCxCu1Efs39fGOnpCkEMxWL+F3FBQmKyhflusqa X-Received: by 2002:a05:6402:1613:: with SMTP id f19mr9668140edv.222.1616160299525; Fri, 19 Mar 2021 06:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616160299; cv=none; d=google.com; s=arc-20160816; b=d++ONSkGmrX0ux1fM0CvDSbX3icARAkZEdhffHZ4uKpzMG3eOxyStnhrizWNDoEOk9 Xsuth9mmGpqOD81n9fzWE5nipp0glZmuaPAFPr053fYxjFOEbfztaLKWLTi5vnTq1rWJ tNXxsGxLv+VNLQrk9CXZHAN3i0PTxTeDnUhWO0/42fa1gW3r9Hx2/0nDPHdy3yAMKCQw 3F7hJMbY1qOoutq0/CLzjNfJrEqGMIbzsxYWGxG+ih9E3eXOUXvKltjfVMkobBPyRPoH 0VNotnHF4yDnJEbMJEySM+xkDQp9N4NvdB0HuSnqiBXoxUey/FuNaDreOZfhfT6ssUsr XyNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2KS9BVm2N7BFC51UrW+/8IGJ0MRGc1xx7mmgTk+g7Ck=; b=qhPk0m2K5UR8jcp1UH8/SFWLB7LZ2eOc2QOz611IhVchLJiavJC+Bfp1Ba+kYIWLpD K8y+KGh4J9BPXnwhjsWQa6bh+oGr8Lw7JCkdD98uDQgu5LarOnHEXY7ynbmCPjnqSipZ P11vd6EzUp5ym7+jh+AgzSS34dhJVmcVbJEBBDdw8z5NLXmbwtzhDfzSoSblAu+wgcgK o/AkvgnlLcfrAiEzMNikKbTiAVBY05WJHA1nlweQ054bIe5qQy/eDbe2eGuMiFAjKBil jv6TKBHM6Jai8VuPz8bGyyx1APkiqGLOKi0E+w6EXsFIFs0WWVEzkSyuHxCUyO8QTFgj Ez1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n3IUUh3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga16si4052571ejb.361.2021.03.19.06.24.36; Fri, 19 Mar 2021 06:24:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n3IUUh3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbhCSNXJ (ORCPT + 99 others); Fri, 19 Mar 2021 09:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbhCSNWq (ORCPT ); Fri, 19 Mar 2021 09:22:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 911E5C06174A; Fri, 19 Mar 2021 06:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2KS9BVm2N7BFC51UrW+/8IGJ0MRGc1xx7mmgTk+g7Ck=; b=n3IUUh3aXo0JWD2wwOFW2ef/JX 7he8eoKNWqSKvmwXduCO9vGrHKcg6SnwHcWTHJz45edEUqaq/hk8q727hY2kq9y+jTFam61GWQrhG fmfHy5usrFG5GE9yqN8jAw8ePQ6miFu5YdhdXtNUwb1GYKYsbxiX8h/xOTD7qgAT3ZAhYH9G+vjhe L8g1fXJrm4rd3vUE4Ho2bTvg3vU4DixQcHhX1a/yYR/xYepeqAIlRcNguEJRERXQcB9jfShsBIsie liOlvmtwm1KYswYxVtFGkUXreaphaYAvVDtIZ/CKukhYqlB5DpNYwgkol/zsXmaXvINPWvHH8E2V3 H2OmBNDA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lNF4L-004Rbo-Ez; Fri, 19 Mar 2021 13:21:42 +0000 Date: Fri, 19 Mar 2021 13:21:37 +0000 From: Matthew Wilcox To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , Hugh Dickins , Zhou Guanghui , Zi Yan , Shakeel Butt , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: page_alloc: fix memcg accounting leak in speculative cache lookup Message-ID: <20210319132137.GZ3420@casper.infradead.org> References: <20210319071547.60973-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319071547.60973-1-hannes@cmpxchg.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 03:15:47AM -0400, Johannes Weiner wrote: > When the freeing of a higher-order page block (non-compound) races > with a speculative page cache lookup, __free_pages() needs to leave > the first order-0 page in the chunk to the lookup but free the buddy > pages that the lookup doesn't know about separately. Thanks.