Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1321477imm; Wed, 1 Aug 2018 13:57:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpejAwL00DmEsbS4zoZi+Bpaq+Nfusi0zAU3S5y1m/AU1pYB31b6n2AoMssJjultUi5nTBNC X-Received: by 2002:a65:5288:: with SMTP id y8-v6mr25786007pgp.284.1533157055772; Wed, 01 Aug 2018 13:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533157055; cv=none; d=google.com; s=arc-20160816; b=m/vQTg04fQ7A4bCjmU/B3wHsAVZ5L8TZlPxr7voNO0SbieWbuS5IBGrMzP+w3Q9pkW GOstjneLEsxRGqO613oLckArK7aCpA7j8AqCUGbESPeqIZsJRL1JQL1DdLQZlH/7FVIs N8Jv7yAXlQqjF7t82BtVk3qgBgIakUAeJoM8QEZjXQyCUMKoFEvB6k4uO78+vXLGMaYk H/KtIORTIDzRHNlXzlAHL4KlYIu065OX6BrrQd10zvvkqNJo9hiRwCJQDXzSuBeUrpp+ RqzA0etS99PB7Al2i/fDc4rAbww7hbK8qMpom37gixNGuDq20KoOYXgp3r7wGaDSHHlA uiww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=xn2lt8BXGw6bwS7abZR8sOWQ94Xspg7qm7ANWbRUai4=; b=nrAxkBfTJh0bph+7lFaI6bqpMawZGXDhuO9+tXvfEi50SQWytRaVeqZmPAoP32IXMd JTWtYSSayWzd9IkC0Loq89ylVCUawq1j2w0dvoV7+tpm8cUEL33gN7rR9h8hhnjcMqlp EUMg2mvrhizIavN2XNT6dbIDrKOcCO0En5gpVhR1BJgvIYAZ/TC/q62ajewxMDDafTID Xh1kBh5SbJKpXGem61a1SubTKuQoBfstgy2pSFQa33KgF6YIRpGRGPQG7L2ZZpXzlDwU /rFuvRJnZY9YZrQmrE/PbqRdyONUFmH4bgSj/icFbvEazf2JoknQM5U9+X/FpfPkchez a0Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EjDJ7SKg; 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 e125-v6si16222067pgc.424.2018.08.01.13.57.20; Wed, 01 Aug 2018 13:57:35 -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=@linux-foundation.org header.s=google header.b=EjDJ7SKg; 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 S1732368AbeHAWoJ (ORCPT + 99 others); Wed, 1 Aug 2018 18:44:09 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:46323 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732067AbeHAWoI (ORCPT ); Wed, 1 Aug 2018 18:44:08 -0400 Received: by mail-io0-f178.google.com with SMTP id i18-v6so17279086ioj.13 for ; Wed, 01 Aug 2018 13:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xn2lt8BXGw6bwS7abZR8sOWQ94Xspg7qm7ANWbRUai4=; b=EjDJ7SKgVSRZZjP2ly/a6Z4JK53PAUehE0fJxZk6lwzNFXJYTei3bb8JWIQTZhQliS CE7oOvCZIteFMHhjZT3P97AbV1V8qY/707GZufTIlnNYdbZV7uRNDgN1avwaN83y57BJ swG12DHMP4LpBdOWesUmZTXmw125264zbyvEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xn2lt8BXGw6bwS7abZR8sOWQ94Xspg7qm7ANWbRUai4=; b=bzIOeuM2gSBvZ4f0/mJ1CeZTm3FMyZexq9dSxUvwKCFPmPnucwn75WBQpQdXyH6mnY uiOfUUaJHpE7xmZHbhDQ9eJYLcI7Ie4+vauTqi7yaZ39QTSBLRtx9+WIaLlcd6244/yD SlkJ0u+3PiG1K82LPkzJOdyH0BfBQzj8VQS8MZRQu4gzK+R/fHUNOnKN8GmXIuieFVad 2o5wsB2WttixsOG5cxeJOUvcJ1NwUC8UJeyrvjVX2cxiBD+JDtsik5CGI7QkkmhBOHOb +jDNV/AurQo15DQpVOwiUoBmOH0PjC2Qk3/3K6zbyMN7YOGVp0YFnBFTJ4chu1Sj9VR4 ha8Q== X-Gm-Message-State: AOUpUlFUh2FnkCrKd4goYPFCPzO5gXKcdz9qna6jn5F+0JrtlNpyRlK5 mh3t53stbyvZMnUgtj+SARRhYvh4m3NIzCOsZpE= X-Received: by 2002:a6b:7a05:: with SMTP id h5-v6mr5015874iom.238.1533156990515; Wed, 01 Aug 2018 13:56:30 -0700 (PDT) MIME-Version: 1.0 References: <20180731170328.ocb5oikwhwtkyzrj@kshutemo-mobl1> <20180731174349.GA12944@agluck-desk> <20180801205156.zv45fcveexwa2dqs@kshutemo-mobl1> In-Reply-To: <20180801205156.zv45fcveexwa2dqs@kshutemo-mobl1> From: Linus Torvalds Date: Wed, 1 Aug 2018 13:56:19 -0700 Message-ID: Subject: Re: Linux 4.18-rc7 To: "Kirill A. Shutemov" 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. > In longer term we can change the interface to take mm instead of vma. FUCK NO! Goddammit, read the code, or read the patch. The places ytou added those broken vma_init() calls to were architecture-specific hacks. Those architecture-specific hacks do not get to screw up the design for everybody else. Linus