Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1618901rwe; Fri, 2 Sep 2022 00:20:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Otyi7Eky4JEj2H6//2726JuMB/JuE32sXGr4EJeIlSwutMf6b1ogo1C3gb7/kg0vhAguv X-Received: by 2002:a17:907:7b94:b0:731:1b11:c241 with SMTP id ne20-20020a1709077b9400b007311b11c241mr27293655ejc.676.1662103223737; Fri, 02 Sep 2022 00:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662103223; cv=none; d=google.com; s=arc-20160816; b=TLdGNaXuEpr/sUF0mLhogPiVtC85071ZunQPhyK27saAJlcyJZGHe1xcCZj7Rjmdi1 5K4YfqxylozgIq/UZsOr7sEQjDBoPJd/PfQzdPVPWQ9FzlFD6XZ/J7VoshHtslr+/K6/ qf7xQTkE0m29ezDhJlRXFQZuD37PoRBDVfzXOpW8D9zT2LSSs+yxWwCxYuF9UcKUz0TZ 5CU+DbTkDaf6ThZt2nx3nb3wK6T25N5q4poJgf4kRXlp8lTyhXrJddHztmFxv4A0Xqdc RgGWn70NvHjd3pVJynx4Wcte0QTgE81PKd4RDXkOPuZoEr8mobAkmf2k576UrVaMQBwR cVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=CzecCuEjT8bsZhw/7187r3Lof871WwEw17oDlg4yQ4A=; b=Gqjvt1lSIlr0xLMOR91JziRdfuuN2NbAA/kkpyfSdqNjztSiBdC5cQcOemLrBR8IDM Cj6Lnwqb28j/1aDAodpxpabPAzdstvXAaxvYyyxSznlEYpi2xZYJJ4lMVa2I9UdXvgc6 Okpd6tAhoqNLJ66qKHciG4Xyv8lESSEoSanrwIFQtLAz2e4ZlfECEy0jEI0UGtT7dTJZ Ay3cb+Jf4k+wD3XIwwfu1OU8cX3c1vARJ37Qc+LTRANpP/DamGIjONpOp1BaQfuSPN4S T04/Wdb9P7JIeZP3cJlgTHipxiybZWeStzNUmESPSpXvpBpcPbDbzEivgQWjqQccspqj my4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LSOdTCIm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr18-20020a170907721200b00741c0bd705dsi1321645ejc.631.2022.09.02.00.19.58; Fri, 02 Sep 2022 00:20:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LSOdTCIm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235490AbiIBGvo (ORCPT + 99 others); Fri, 2 Sep 2022 02:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235373AbiIBGvl (ORCPT ); Fri, 2 Sep 2022 02:51:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115F895AEA for ; Thu, 1 Sep 2022 23:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662101499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CzecCuEjT8bsZhw/7187r3Lof871WwEw17oDlg4yQ4A=; b=LSOdTCIm0Pp5vLo/pUKYONOScResI8d5KzAe3/HWNJmi1iNnFJQKBHnbFTHDhKjyJKKhwJ Qwv2H1iJOlB6n1y+sR0I7U/b+4rSLeNGy2oe14LU3p6pzejm4YTohMfvGZRnKh2bOz6YSK BmaBje1cZIPLJvvYd/XxheMAz8Pv2og= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-441-wHcyup2VMceEQwqO6lXr3A-1; Fri, 02 Sep 2022 02:51:38 -0400 X-MC-Unique: wHcyup2VMceEQwqO6lXr3A-1 Received: by mail-wm1-f72.google.com with SMTP id j3-20020a05600c1c0300b003a5e72421c2so3417990wms.1 for ; Thu, 01 Sep 2022 23:51:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=CzecCuEjT8bsZhw/7187r3Lof871WwEw17oDlg4yQ4A=; b=OVtGIsPMxfiMO89Nu8FD+wdn7sLXKj5YANQlgMvfalCgE046rXZB01AMCh5FhPd+xr ZdXdClgOA83wunFf7HJeOINikuF9IzfU22YT94pD91YmVC7VdsknD7UWJKR8VGROrjaO bL7uO+VYJbSSrVJlZ2IMYFrVOcyPNu01Y7v4JJT98TLbjo0lu4I0VE+JUzIVK3UZBwq4 KkFgajFza37RLn9AJyzFTWFk3aUvTVnSqcqVs4dJ70hpbGCeKxlyN1vyHNCzfOCZPFi3 qviBUXTzPyUMXuQ1JKrnxWsL0oGPsTPcOlhuadjHSGzowGrVVR1FHFratAaDsF5oAuQ7 /97g== X-Gm-Message-State: ACgBeo2JH8HWtuz3VCfwCdDvHmO2mhpDHwnsDzFwxIMzEHeFg2DLcefQ jwybGYbfy/vXrSDtNUxX3wej+IBk2MyK11/0qLUSPxv6/flGrrKB7sJQVREWKYqYprnV1o49dRk KtbocNQHfb7chusYJet6j9b+w X-Received: by 2002:a5d:5a82:0:b0:224:f744:1799 with SMTP id bp2-20020a5d5a82000000b00224f7441799mr16343591wrb.582.1662101497174; Thu, 01 Sep 2022 23:51:37 -0700 (PDT) X-Received: by 2002:a5d:5a82:0:b0:224:f744:1799 with SMTP id bp2-20020a5d5a82000000b00224f7441799mr16343574wrb.582.1662101496869; Thu, 01 Sep 2022 23:51:36 -0700 (PDT) Received: from ?IPV6:2003:cb:c714:4800:2077:1bf6:40e7:2833? (p200300cbc714480020771bf640e72833.dip0.t-ipconnect.de. [2003:cb:c714:4800:2077:1bf6:40e7:2833]) by smtp.gmail.com with ESMTPSA id x1-20020a5d6b41000000b002250c35826dsm727061wrw.104.2022.09.01.23.51.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 23:51:36 -0700 (PDT) Message-ID: Date: Fri, 2 Sep 2022 08:51:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v4 2/4] mm/migrate_device.c: Add missing flush_cache_page() Content-Language: en-US To: Alistair Popple , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Peter Xu , Nadav Amit , huang ying , LKML , "Sierra Guiza, Alejandro (Alex)" , Felix Kuehling , Jason Gunthorpe , John Hubbard , Ralph Campbell , Matthew Wilcox , Karol Herbst , Lyude Paul , Ben Skeggs , Logan Gunthorpe , paulus@ozlabs.org, linuxppc-dev@lists.ozlabs.org, stable@vger.kernel.org References: <9f801e9d8d830408f2ca27821f606e09aa856899.1662078528.git-series.apopple@nvidia.com> <5676f30436ab71d1a587ac73f835ed8bd2113ff5.1662078528.git-series.apopple@nvidia.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <5676f30436ab71d1a587ac73f835ed8bd2113ff5.1662078528.git-series.apopple@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.09.22 02:35, Alistair Popple wrote: > Currently we only call flush_cache_page() for the anon_exclusive case, > however in both cases we clear the pte so should flush the cache. > > Signed-off-by: Alistair Popple > Fixes: 8c3328f1f36a ("mm/migrate: migrate_vma() unmap page from vma while collecting pages") > Cc: stable@vger.kernel.org > > --- > > New for v4 > --- > mm/migrate_device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/migrate_device.c b/mm/migrate_device.c > index 6a5ef9f..4cc849c 100644 > --- a/mm/migrate_device.c > +++ b/mm/migrate_device.c > @@ -193,9 +193,9 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, > bool anon_exclusive; > pte_t swp_pte; > > + flush_cache_page(vma, addr, pte_pfn(*ptep)); > anon_exclusive = PageAnon(page) && PageAnonExclusive(page); > if (anon_exclusive) { > - flush_cache_page(vma, addr, pte_pfn(*ptep)); > ptep_clear_flush(vma, addr, ptep); > > if (page_try_share_anon_rmap(page)) { Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb