Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5331444ybi; Wed, 12 Jun 2019 00:21:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHCpXotDZlfbhIRZvntA+/sIQBgwOvHjy8i80+2mBD+9wc+JFYcvEL6Mjh6lbda17T0I2i X-Received: by 2002:a17:90a:f498:: with SMTP id bx24mr31917708pjb.91.1560324117024; Wed, 12 Jun 2019 00:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560324117; cv=none; d=google.com; s=arc-20160816; b=tOb2DkC8lA5iiJ8buKiz4qtO7QU2f9rsH6m7kDBlvo2o24xmHb300B48JMwCv/iEfK KL2VHz2YWqdahYQ4a6HB82V7Ab76jl9p62kc7BjxnB/k5EzplCd3Cspx06ttrZQ1YExr epFmctopMel/QvDoDs+m6YYuNxFk0YB9dNVawznpl6QB1Fwy0hoC3nH8JnApgcweoIrO TmlkmWfKlqPft+yY6hAVy0ue7a7qwB5Slip4wKOq4is2IfmLxJZDhRMUGbI2zmADblmw goYzF8tQXPeeXDn3T080Vt2ZhDjjyzfwhgVhoNWvLAbRJYeITycTzHdMum/dSPyeuQpx EsRg== 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; bh=SZXVeOYEeW/t6moRL6yl166/GZV1HqW8qo9aOqBVN+Q=; b=i/LUfGGhwSqWCO/XG7l9+7N1j4nxy/4KglvYZmaR6jfsplf6NDlMiQ7qMLH7kzlS7N OcaZYq6VJ585TYUJdoyWvpTPQXxq9LB9g5JH55hvDQsCRDCk/mWIMfFyhBaP/Nj0a6aG EAc+sQ5Xazaaciup1r3EqC3gBQ8/ALU0AAOjdei+QJ678yzUTA26oNjNv1v/Sk0gYxEg vR35cPI2pg7ums/SID08D5Ps0s3Z3jmpp2FhOVsNtGw+dPMaeAKAvJ9JXPJN4r0h4dwB uYDb1YJZYBf9ZvI8H2Jb7IN+Xt6IfVnk9iuuqYwAyyNZtwewDL9AtjaPJLEk1mf+7bH+ nzhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gAjfSlHu; 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 c2si13989107pfr.5.2019.06.12.00.21.37; Wed, 12 Jun 2019 00:21:57 -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=gAjfSlHu; 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 S2407567AbfFLBJn (ORCPT + 99 others); Tue, 11 Jun 2019 21:09:43 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39209 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405839AbfFLBJn (ORCPT ); Tue, 11 Jun 2019 21:09:43 -0400 Received: by mail-lj1-f193.google.com with SMTP id v18so13509312ljh.6 for ; Tue, 11 Jun 2019 18:09:41 -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=SZXVeOYEeW/t6moRL6yl166/GZV1HqW8qo9aOqBVN+Q=; b=gAjfSlHuLsIpxvb8lF0RyxQXzEhYSHQJnAZ4as99A8GBRPKGt8LtILDEijhajNv2fV FXhIx40OUX4WPq1W1eQvis0UNqIoFt7tkihxVZ4QyREYOfVPuleZ/0Zq1i4TWCfQY/NA AhmvmJi02EHwj98eCflp9T4F3Jku2HpzQgXkw= 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=SZXVeOYEeW/t6moRL6yl166/GZV1HqW8qo9aOqBVN+Q=; b=bnwLHPET2LkFI9l+VnQhUsFcXKZgG7lsm5UzTElNR2It9SzN6LwRYgQn8V2d+HcFg4 eI0LJCjHE39SlE8sdLwNez3ltSNYHHQGhi0I2igtpew/oyER4ZhXI1qMVIzwDNzYi67s dxREYRgemD7UtqJaI0IeXFC9t1fEzR32vThrH+zAjQq5xieCkXdjMMwyiNYo0yhthY6R zQocoTTcMXgFN8wfSxoE7pwtox3QHmBpAgjMlbr3RtItT1Vkm2e2NCTb8VpNyRgchF3+ fW6bZ9lipZGdASKWykLkleSOw02UZLi78HJXHXGO2LkF621FKSKgp7LbO7OE03LemLOr THkw== X-Gm-Message-State: APjAAAWPcxzNcGRnIPLbd05c8y+Kn0tuCRTXXJHnXfr7LG3iKIgd4jpU V2qb4Lim3ux4I/HMfc+kuRSsWqXo/DM= X-Received: by 2002:a2e:980e:: with SMTP id a14mr31605066ljj.60.1560301781232; Tue, 11 Jun 2019 18:09:41 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id s12sm2840311lji.34.2019.06.11.18.09.40 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 18:09:41 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id a25so10720849lfg.2 for ; Tue, 11 Jun 2019 18:09:40 -0700 (PDT) X-Received: by 2002:ac2:50c4:: with SMTP id h4mr26185312lfm.61.1560301780325; Tue, 11 Jun 2019 18:09:40 -0700 (PDT) MIME-Version: 1.0 References: <20190611144102.8848-1-hch@lst.de> <20190611144102.8848-17-hch@lst.de> <1560300464.nijubslu3h.astroid@bobo.none> In-Reply-To: <1560300464.nijubslu3h.astroid@bobo.none> From: Linus Torvalds Date: Tue, 11 Jun 2019 15:09:24 -1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure To: Nicholas Piggin Cc: Rich Felker , "David S. Miller" , Christoph Hellwig , James Hogan , Paul Burton , Yoshinori Sato , Andrey Konovalov , Benjamin Herrenschmidt , Khalid Aziz , Linux List Kernel Mailing , linux-mips@vger.kernel.org, Linux-MM , linuxppc-dev@lists.ozlabs.org, Linux-sh list , Michael Ellerman , Paul Mackerras , sparclinux@vger.kernel.org, "the arch/x86 maintainers" 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 Tue, Jun 11, 2019 at 2:55 PM Nicholas Piggin wrote: > > What does this do for performance? I've found this pattern can be > bad for store aliasing detection. I wouldn't expect it to be noticeable, and the lack of argument reloading etc should make up for it. Plus inlining makes it a non-issue when that happens. But I guess we could also at least look at using "restrict", if that ends up helping. Unlike the completely bogus type-based aliasing rules (that we disable because I think the C people were on some bad bad drugs when they came up with them), restricted pointers are a real thing that makes sense. That said, we haven't traditionally used it, and I don't know how much it helps gcc. Maybe gcc ignores it entirely? S Linus