Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbcK1RmO (ORCPT ); Mon, 28 Nov 2016 12:42:14 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:33996 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbcK1RmI (ORCPT ); Mon, 28 Nov 2016 12:42:08 -0500 MIME-Version: 1.0 In-Reply-To: <31b1393c-22d2-8a49-842c-9678a1921441@intel.com> References: <026b73f6-ca1d-e7bb-766c-4aaeb7071ce6@intel.com> <20161128083715.GA21738@aaronlu.sh.intel.com> <20161128084012.GC21738@aaronlu.sh.intel.com> <31b1393c-22d2-8a49-842c-9678a1921441@intel.com> From: Linus Torvalds Date: Mon, 28 Nov 2016 09:42:07 -0800 X-Google-Sender-Auth: kG9QHhAQeQ_j1GvqcoTPi9TslV4 Message-ID: Subject: Re: [PATCH 2/2] mremap: use mmu gather logic for tlb flush in mremap To: Dave Hansen Cc: Aaron Lu , Linux Memory Management List , Andrew Morton , "Kirill A. Shutemov" , Huang Ying , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 582 Lines: 13 On Mon, Nov 28, 2016 at 9:32 AM, Dave Hansen wrote: > > But, both call-sites are still keeping 'force_flush' to store the > information about whether we ever saw a dirty pte. If we moved _that_ > logic into the x86 mmu_gather code, we could get rid of all the > 'force_flush' tracking in both call sites. It also makes us a bit more > future-proof against these page_mkclean() races if we ever grow a third > site for clearing ptes. Yeah, that sounds like a nice cleanup and would put all the real state into that mmu_gather structure. Linus