From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35CF4C433E7 for ; Fri, 9 Oct 2020 22:51:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BFDE7222EB for ; Fri, 9 Oct 2020 22:50:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="HKkzyoIV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFDE7222EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1EEDE940015; Fri, 9 Oct 2020 18:50:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19F4D94000C; Fri, 9 Oct 2020 18:50:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 066C7940015; Fri, 9 Oct 2020 18:50:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id CA95B94000C for ; Fri, 9 Oct 2020 18:50:58 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6F9A7180AD811 for ; Fri, 9 Oct 2020 22:50:58 +0000 (UTC) X-FDA: 77353883796.08.nest26_2512eb7271e4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 49BF21819E798 for ; Fri, 9 Oct 2020 22:50:58 +0000 (UTC) X-HE-Tag: nest26_2512eb7271e4 X-Filterd-Recvd-Size: 2762 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 9 Oct 2020 22:50:57 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7DA05222EB; Fri, 9 Oct 2020 22:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602283857; bh=zcmB/pdpydbCgKBcPlaBkRATTHHSFEh+mhWUqm1eToM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HKkzyoIV5otAbM1mB0lNAjMilwTpPBpdQ1VIUp5kruHuS/yJ79W6djbNnWC8BTWkN cU1zEuiFy994wfhNta/RB5YOw21Sqv38bVgPtSszaB84k2dkPOftB7Hyx21TkfZgN6 Kb4ynNbxddISq4R/yaEo6Cfpx27gJOdgEFPxzg18= Date: Fri, 9 Oct 2020 15:50:55 -0700 From: Andrew Morton To: Ralph Campbell Cc: , , , Johannes Weiner , Michal Hocko , Vladimir Davydov , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Balbir Singh , Ira Weiny , Subject: Re: [PATCH] mm/memcg: fix device private memcg accounting Message-Id: <20201009155055.f87de51ea04d4ea879e3981a@linux-foundation.org> In-Reply-To: <20201009215952.2726-1-rcampbell@nvidia.com> References: <20201009215952.2726-1-rcampbell@nvidia.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 9 Oct 2020 14:59:52 -0700 Ralph Campbell wrote: > The code in mc_handle_swap_pte() checks for non_swap_entry() and returns > NULL before checking is_device_private_entry() so device private pages > are never handled. > Fix this by checking for non_swap_entry() after handling device private > swap PTEs. > > Cc: stable@vger.kernel.org I was going to ask "what are the end-user visible effects of the bug". This is important information with a cc:stable. > > I'm not sure exactly how to test this. I ran the HMM self tests but > that is a minimal sanity check. I think moving the self test from one > memory cgroup to another while it is running would exercise this patch. > I'm looking at how the test could move itself to another group after > migrating some anonymous memory to the test driver. > But this makes me suspect the answer is "there aren't any that we know of". Are you sure a cc:stable is warranted?