Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1347939imm; Wed, 1 Aug 2018 14:26:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5SfCy/ati2LJXQNaQJGLgj1gy64hu6AWJ+5nwzBPKRaM1Xw2tl52jgam+WsL6ZiPgXuPV X-Received: by 2002:a63:6092:: with SMTP id u140-v6mr15858pgb.433.1533158787574; Wed, 01 Aug 2018 14:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533158787; cv=none; d=google.com; s=arc-20160816; b=u7hiKSa7mDdKfFNr87IFe5bhgigvxecic4sV9NY6oBy9Q7QdYs0SfOqkGXrCc9ck+o obbK2H0rerycXYRXlZfld+menJd+E9HJdlnc8xbG6qGbHy4dVRv1PvIzmQmrZrJvJHRR SvYgMGTrB+e7QfSRNV0g596AJ0YeVlcz8LTeqPGOPaS0glj7pen+/N/rbb4Z4PvQ/uc2 kJedwRVlzBW48/t2o+E030YAO0IPPFLzTcOehajhH3lzfQJ6Yq269w4wLO/OAH046sG0 s8s4OeCdp7lfWYeojvfGL2VKvuFWEbTP4G67C25j7s65/gkSbbPoXyImDHi+XUbwgGQv ap9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kE1AGdJ939jQO6DWYLwLyERgIXcKrtdQ0Cb0TkwQWrs=; b=XURvch6775xxaa9tkgJQTeHCAT5ky2n/e/rKRPkndND+8JU1ZkPibmHnvXrPG5A476 ozPCZsTXp/1tm4WvNFDSE7vje9fm427jpfE3RWtfnsFLvapMXblhSh8JXrJETexbWyni miX6B6IwaxFALudFpNxl3AU7CCJ3r75ZdtH6GUmNj/tFo5he+C0BYlMFRjY2zZEMHWtq qcbmhwdf4c7j5RI32iJtzNYokYzSk7MJvs+PvC/2LDTHTFqOTpo67wLpEMhESOfAusTa ZLUIpp5t2gDV9dGpvysS/Jd4O8A0M7qJYO6jXBjj7JBj10iGzVl1biRWp25IqeN6YOHO SWCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=d1oRLySr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s65-v6si13591pgb.486.2018.08.01.14.26.12; Wed, 01 Aug 2018 14:26:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=d1oRLySr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732243AbeHAXNI (ORCPT + 99 others); Wed, 1 Aug 2018 19:13:08 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40298 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727086AbeHAXNI (ORCPT ); Wed, 1 Aug 2018 19:13:08 -0400 Received: by mail-pf1-f194.google.com with SMTP id e13-v6so24057pff.7 for ; Wed, 01 Aug 2018 14:25:24 -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:in-reply-to:user-agent; bh=kE1AGdJ939jQO6DWYLwLyERgIXcKrtdQ0Cb0TkwQWrs=; b=d1oRLySrUsBlAah+HeTjeeSJdkueTZIbfzKjP5/yjmBUntlltExmn4Pb2j1HBHIakx TbI04WbzYAV8Vh0cki8xEWUHU28pm+AZf50mk0t0lyKNjVFbsB17USBKAxQRabCqfed4 XDDdJw3815R81RKnwpBSsL1wn5TkICnUxEU0kzqd20/wPhk6XnAHP3BI5OuP83ND17nE tjiX693bXOeBquDEYkuzHJRHJ6Ci5m+T7xOOHOPxUS7bFwMezK+C8rFes56u4/NWkTNx pnZxCbr/Y5cJ2ytlxAJUJg2Wjz73s5jDTdX26ZawxttutsEYxiXQ9e1/s31Tb90zYvwl QYLA== 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:in-reply-to:user-agent; bh=kE1AGdJ939jQO6DWYLwLyERgIXcKrtdQ0Cb0TkwQWrs=; b=OjowmqKZuzbmEGjDHUA6V4tltwgd7tw//0fjphNEphEBLvSO4T9JMXPeLoSj4I+RVO f4skhnwS050L7Fldm5HzLnuAHMXzlC5e5GyCc0yHWZWXlRTGJE/S7+0U10eW+J+kkmrF wkrLQ5Re/qIbcZhMyGkLP9XKoWlN6me5KbJzwjGUHkEpDpg92Obols518rKynoRf28oX z8pxB0aCd5XOOm+RwwSbtRatS1ZIo6mqP9btWxg2xkPqQUXVB4Pon/SbbvMKKQHTY+Pe 6QmcVPHpauRfpyd2xwmnCwoLO6+19y2h83cWn1CqhgLZ+uded6lSgmrcq8qFEDovktQm Em8g== X-Gm-Message-State: AOUpUlERw3mf1fMDAV3BoIwCrR3nQCUt5du8x6/rZJsZgOl+aVRDqfBM ++5qMH1Eur00/wWrFHBSnW/fYw== X-Received: by 2002:a62:ce81:: with SMTP id y123-v6mr32281pfg.95.1533158724232; Wed, 01 Aug 2018 14:25:24 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id v6-v6sm68003pfa.28.2018.08.01.14.25.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 14:25:23 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 15EEB3002A5; Thu, 2 Aug 2018 00:25:18 +0300 (+03) Date: Thu, 2 Aug 2018 00:25:18 +0300 From: "Kirill A. Shutemov" To: Linus Torvalds Cc: Tony Luck , Amit Pundir , John Stultz , Hugh Dickins , Matthew Wilcox , "Kirill A. Shutemov" , Andrew Morton , Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , Greg Kroah-Hartman , linux-mm , Linux Kernel Mailing List , youling 257 , Joel Fernandes , Colin Cross Subject: Re: Linux 4.18-rc7 Message-ID: <20180801212518.jjdwf53p3sj4b455@kshutemo-mobl1> References: <20180731170328.ocb5oikwhwtkyzrj@kshutemo-mobl1> <20180731174349.GA12944@agluck-desk> <20180801205156.zv45fcveexwa2dqs@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 01:56:19PM -0700, Linus Torvalds wrote: > On Wed, Aug 1, 2018 at 1:52 PM Kirill A. Shutemov wrote: > > > > Is there a reason why we pass vma to flush_tlb_range? > > Yes. It's even in that patch. > > The fact is, real MM users *have* a vma, and passing it in to the TLB > flushing is the right thing to do. That allows architectures that care > (mainly powerpc, I think) to notice that "hey, this range only had > execute permissions, so I only need to flush the ITLB". > > The people who use tlb_flush_range() any other way are doing an > arch-specific hack. It's not how tlb_flush_range() was defined, and > it's not how you can use it in general. Okay, I see. ARM, unicore32 and xtensa avoid iTLB flush for non-executable VMAs. > > > It's not obvious to me what information from VMA can be useful for an > > implementation. > > See the patch I sent, which had this as part of it: > > - * XXX fix me: flush_tlb_range() should take an mm > pointer instead of a > - * vma pointer. > + * flush_tlb_range() takes a vma instead of a mm pointer because > + * some architectures want the vm_flags for ITLB/DTLB flush. > > because I wanted to educate people about why the interface was what it > was, and the "fixme" was bogus shit. I didn't noticied this. Sorry. -- Kirill A. Shutemov