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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 01522C433E0 for ; Tue, 14 Jul 2020 10:19:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AED3B221FF for ; Tue, 14 Jul 2020 10:19:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="IY4UxVnz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AED3B221FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 349606B000A; Tue, 14 Jul 2020 06:19:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F91A6B000C; Tue, 14 Jul 2020 06:19:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20D136B000D; Tue, 14 Jul 2020 06:19:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 08E0B6B000A for ; Tue, 14 Jul 2020 06:19:51 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 785AD181AC9CC for ; Tue, 14 Jul 2020 10:19:50 +0000 (UTC) X-FDA: 77036285340.08.birds28_43092e326ef0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 429821819E76B for ; Tue, 14 Jul 2020 10:19:50 +0000 (UTC) X-HE-Tag: birds28_43092e326ef0 X-Filterd-Recvd-Size: 4293 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 10:19:49 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id o4so11023228lfi.7 for ; Tue, 14 Jul 2020 03:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=2mWXGb8qDwWepwC9GtvAtfuTcRSkTZNoUz/7tBuj5w4=; b=IY4UxVnzzRcsGwYrBKqt/5e25O/9f0c09XQ9ySHCczZy/i0f0gYx9QLwZtXoJ8X7ZM 5MW8/0dDgLBTX6Q4TE87LTvdoHKvCj57HHbHI0HpjGL8h/cg6/kw5hx+04UxsaoDCNy+ P4tPvwDURrTeOKfPv921zK42DMIAvxiJ7IIlqlJ3rkxhhK91YOcLC6HOEQ1aN6fJ03+Q Is/Mh1WHNi2qXNUoD8ejk83nG8RWH6H/eDqQWhGgwWMPujV0VJuPgtd0GpFSw0cBeR0q 2EsxV4r06bH603rAdR8GS4qX8bMh9OWqM77a1EXmIccI7Tgba33H2zXPPfZ+bPQrU9Wl /k1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2mWXGb8qDwWepwC9GtvAtfuTcRSkTZNoUz/7tBuj5w4=; b=WSN1aDN3ZKbYphkiTF59oAxyorfLAFZjEQjPt85VesQUJ3uuKj6l1baMte5mje81Cp m/xqyfWdN1uySWBo3l2PGLdTPooHSV+wvSuRX/2MjXOygIn8lDfM3NEa7SpMSwWzBlnH SAVLw9bW5ofAnn8YgVn2QsxsI/T4VR+ID/DKLpDlyKPIJf4/Lqkul4P+gjR9sSy9DJdo 4ZtvHN8dr4hKahtGIvlno7ALO4Le17SUpJVjcdMjDPByAkajNQyZMRK2q7XoF/5nnE51 XBT1HhS6RPKl/J5L+3Hwq3ZPqmTjR2dhOGXD1nUw1SUqcCMXlaPmCsn+OcJdwbwbxY7R 3tiA== X-Gm-Message-State: AOAM5313JtQa9gjL50nDC4Ncxn6nzvO8o9dngQvQGNSFT1SPu0ZrGK0G ZXykYgq5Fq71jzptH5aw9YlB9g== X-Google-Smtp-Source: ABdhPJw/OsMOz/4ZB1ZoSYenOQRRXbfc7EqRKqARM2W6By60PrLuXAdBdxPvMyyECZzfP/PMH7riHg== X-Received: by 2002:ac2:5a4b:: with SMTP id r11mr1882755lfn.39.1594721988316; Tue, 14 Jul 2020 03:19:48 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id 11sm4540766lju.102.2020.07.14.03.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 03:19:47 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 2C21D1020F7; Tue, 14 Jul 2020 13:19:51 +0300 (+03) Date: Tue, 14 Jul 2020 13:19:51 +0300 From: "Kirill A. Shutemov" To: Vlastimil Babka Cc: Robbie Ko , linux-mm@kvack.org, LKML , linux-btrfs@vger.kernel.org, Roman Gushchin , David Sterba , "Kirill A. Shutemov" Subject: Re: [PATCH] mm : fix pte _PAGE_DIRTY bit when fallback migrate page Message-ID: <20200714101951.6osakxdgbhrnfrbd@box> References: <20200709024808.18466-1-robbieko@synology.com> <859c810e-376e-5e8b-e8a5-0da3f83315d1@suse.cz> <80b55fcf-def1-8a83-8f53-a22f2be56244@synology.com> <433e26b0-5201-129a-4afe-4881e42781fa@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <433e26b0-5201-129a-4afe-4881e42781fa@suse.cz> X-Rspamd-Queue-Id: 429821819E76B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.041971, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 14, 2020 at 11:46:12AM +0200, Vlastimil Babka wrote: > On 7/13/20 3:57 AM, Robbie Ko wrote: > >=20 > > Vlastimil Babka =E6=96=BC 2020/7/10 =E4=B8=8B=E5=8D=8811:31 =E5=AF=AB= =E9=81=93: > >> On 7/9/20 4:48 AM, robbieko wrote: > >>> From: Robbie Ko > >>> > >>> When a migrate page occurs, we first create a migration entry > >>> to replace the original pte, and then go to fallback_migrate_page > >>> to execute a writeout if the migratepage is not supported. > >>> > >>> In the writeout, we will clear the dirty bit of the page and use > >>> page_mkclean to clear the dirty bit along with the corresponding pt= e, > >>> but page_mkclean does not support migration entry. I don't follow the scenario. When we establish migration entries with try_to_unmap(), it transfers dirty bit from PTE to the page. --=20 Kirill A. Shutemov