Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4448592ybh; Tue, 6 Aug 2019 11:51:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9Cg+mVDRSnMTyZTdz7uiKWLwf4S01C7rSdV10juNSojaBlxo1lxghw0xcDUaz2z9kTgCO X-Received: by 2002:a63:2148:: with SMTP id s8mr4221320pgm.336.1565117518462; Tue, 06 Aug 2019 11:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565117518; cv=none; d=google.com; s=arc-20160816; b=nnMyFHpDCDd6n5eQx0z6zKuV9bIuuDUtpzuIPxLNd2TQ69EZQtqB3KlPmVl6tRzaNM d8KPfNYVUsd01xjdYV6/uUZoPfLySP42ZbUl5CFlFgLcaDYkkSPM1YCO17zTcT4u9y7/ 3Ro9BX3FlJlU/tqK+p0NaZ1uRmt7nxuLf8SSW047NIQ+amMiEQC6PPnwBKgyjUijM9lF l4Y9QxYAi0kFE3tmMC+dBAqslYWmRoSnlPN2Ve3iBo01LQWCj3lyeUjs4gJNKHic8gWm Br3P7wl3BblCYL9gSaK7giL6jzdrBqs8WM6iR4cXumFB210RCwa19+cCu+5jmsEtEymd VM2g== 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=YFrdn8TjmQNSnIaAcCuqbEzq3mrXCDg59WKear6Xdpg=; b=K5TcexsP2Ki7vMzle6ZZKKU/3jEvggkzo64yQfgRN/YlKopltQIpRrosbxIhryURBI vkcDTycZdYNznEXnM965M9BORNEAE9H6KGGiDmsq7zT083DHR4ulFJlxNSpsPzoF5GV2 BP80c2Cx7LLUvWRmE2Tjqe26uJmKGL6uDQhBO+aw0p31Kqt/le7UyZf2MzTi0+erDoGA cJ+EKoLpGZ420C2FXrr36FmzxMrbKMliWsAwDbsd6JqIlU404hbPLwE+TlNjpzPyLemq W8axKY9c9DGjU/+vbqgcmADoALa+bhnX+41rl6KMht472JFFcQs3BpGftN9/YjJlO5Wm 9Zrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MlysRV02; 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 j12si47927726pfe.188.2019.08.06.11.51.42; Tue, 06 Aug 2019 11:51:58 -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=MlysRV02; 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 S1726119AbfHFSvD (ORCPT + 99 others); Tue, 6 Aug 2019 14:51:03 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:42380 "EHLO mail-lf1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfHFSvD (ORCPT ); Tue, 6 Aug 2019 14:51:03 -0400 Received: by mail-lf1-f47.google.com with SMTP id s19so62028801lfb.9 for ; Tue, 06 Aug 2019 11:51:01 -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=YFrdn8TjmQNSnIaAcCuqbEzq3mrXCDg59WKear6Xdpg=; b=MlysRV02mcMixM5P973XDGPSxckBz4Nea7C3SNGSHcfQXpMYCeOaEo4xQvZFVIgIBy AFFjp9IQ8QdVB/2B+8z1j1rT4dC0Ak27vpobppoYytcpWfuMnn4/z0OVQMXSAxk5j/X4 5pVDLEKsr8UIaKS0UpizhCPTazxnvNME05Bg0= 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=YFrdn8TjmQNSnIaAcCuqbEzq3mrXCDg59WKear6Xdpg=; b=CPIDck8RaU7g1iIe2lu38mmJEVsZUQP2koSa5VO0oIMmP/8t8Ny3MwssxXpTEdBD7o PZK1ZOyono+BGqTijxUX2ExzWsn0WtQbRUFJ8uQl55SXAmaUSHsSVVKVok5OItei/zQ4 EmV0/wn0xgjQNrYKF67LUtwuROh6WL1JIpoYomY4VuQE6mmlqD8x2pP2Cw93m8ob9iZV 8L23Cmc/eVMeuloAFZrGoDIWCsco5yZxW6nrn/7ldijNOsdGjW0n0C3IFU67RXrpQyrS rf2CBhBPC3eyLHXvtbK3V3D/tssdDS/+c8knQMRHloGg0t7DgwRyumvnmLy08tU7KqUp 9umg== X-Gm-Message-State: APjAAAULCG97EPxTkP5pSzBYrg4Cv7BZaHngiWPF49aMs9//dq/D1deH YA2E2I5vWFMbtVRFcup1CZpHwF6Vph4= X-Received: by 2002:a19:5e10:: with SMTP id s16mr3374091lfb.13.1565117459797; Tue, 06 Aug 2019 11:50:59 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id s24sm17980378lje.58.2019.08.06.11.50.58 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 11:50:58 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id c9so61958997lfh.4 for ; Tue, 06 Aug 2019 11:50:58 -0700 (PDT) X-Received: by 2002:a19:c20b:: with SMTP id l11mr3479307lfc.106.1565117458380; Tue, 06 Aug 2019 11:50:58 -0700 (PDT) MIME-Version: 1.0 References: <48890b55-afc5-ced8-5913-5a755ce6c1ab@shipmail.org> <20190806073831.GA26668@infradead.org> In-Reply-To: <20190806073831.GA26668@infradead.org> From: Linus Torvalds Date: Tue, 6 Aug 2019 11:50:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: drm pull for v5.3-rc1 To: Christoph Hellwig Cc: =?UTF-8?Q?Thomas_Hellstr=C3=B6m_=28VMware=29?= , Dave Airlie , Thomas Hellstrom , Daniel Vetter , LKML , dri-devel , Jerome Glisse , Jason Gunthorpe , Andrew Morton , Steven Price , Linux-MM 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, Aug 6, 2019 at 12:38 AM Christoph Hellwig wrote: > > Seems like no one took this up. Below is a version which I think is > slightly better by also moving the mm_walk structure initialization > into the helpers, with an outcome of just a handful of added lines. Ack. Agreed, I think that's a nicer interface. In fact, I do note that a lot of the users don't actually use the "void *private" argument at all - they just want the walker - and just pass in a NULL private pointer. So we have things like this: > + if (walk_page_range(&init_mm, va, va + size, &set_nocache_walk_ops, > + NULL)) { and in a perfect world we'd have arguments with default values so that we could skip those entirely for when people just don't need it. I'm not a huge fan of C++ because of a lot of the complexity (and some really bad decisions), but many of the _syntactic_ things in C++ would be nice to use. This one doesn't seem to be one that the gcc people have picked up as an extension ;( Yes, yes, we could do it with a macro, I guess. #define walk_page_range(mm, start,end, ops, ...) \ __walk_page_range(mm, start, end, (NULL , ## __VA_ARGS__)) but I'm not sure it's worthwhile. Linus