Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5863393ybh; Wed, 7 Aug 2019 12:45:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJd84hX1wFT7gKzNEPKvNK1h1/xuujhDP7bFlI4nBQ4wDg5jYwsVFed83UBXUt1zfR4py9 X-Received: by 2002:a65:6104:: with SMTP id z4mr8922650pgu.27.1565207139293; Wed, 07 Aug 2019 12:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565207139; cv=none; d=google.com; s=arc-20160816; b=oxlZ6Tq6owsxV701wKRCpy5JGqqVeQX14Cdg8gozsTMwmxSH4ztm4snmVifnRj8oZl Ok9UxZshpQJEivhdrtb69Rp+549NepFtJXeDSNuvswdXYUBR9MqVdTWY1YZ4oXEKillA pEUMKFK8N9uxXIBJk+DmbD3nfodCg4DTDCP5+n2gqXC/Hr/tD87vAEK9vk8PJJXw+72v BC9u0i5NQhQ+HKlCrOeNIO8zZQoId7ZOfPqMbb+k3L5sbECzF1y0FmhX1MZ2BADSqnJc ZLTsOAkpso6L+BGFcjJQFsMGyB4wiD4k5+m55ZLdwhXnUdzDsWN/m8dIGkEJ4/8JfPuE b8Bw== 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=IMxqo/U0nw6DmpEA9S3YJIdfMVgNoxeRFMQ95NzIcMY=; b=of3AV7oC2NbrADEw/gl5GGR38SrQxI4BSuBI2YcahEMH0GFipDU9H7qhGFLigAKp6q FV3bWWQACrmI5rxBMFzhymiL4s1Kn5U7Pd4cXM88gkEdNtqIY/qfrmZo7+6oHXv3tmbv D3tL58juygw89l3OEskM1sw5qpYlaKmaetL7nvfX4Kg91ugk3VoHVXBCGTspSvu6+d6T e7jCsS+we9L65lBoZKII9/BLJRPiSLHVceEh3brRbtAwayeslGRZZ9DGgZZCkgPVqx8O bL244QMdiDn7NFFzzKCr463FCymdMHEOThmSoEjYFAX3eOcoduLthCASZXQjawnDCvKZ tqZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=QFLKrC5v; 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 x25si50770256pfn.13.2019.08.07.12.45.24; Wed, 07 Aug 2019 12:45:39 -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=QFLKrC5v; 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 S1730348AbfHGTRN (ORCPT + 99 others); Wed, 7 Aug 2019 15:17:13 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33503 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730145AbfHGTRN (ORCPT ); Wed, 7 Aug 2019 15:17:13 -0400 Received: by mail-lf1-f65.google.com with SMTP id x3so64976975lfc.0 for ; Wed, 07 Aug 2019 12:17:11 -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=IMxqo/U0nw6DmpEA9S3YJIdfMVgNoxeRFMQ95NzIcMY=; b=QFLKrC5vkJW5FKE/Mdgg0Cdcp3sO/GQpVGltLV5Ca6yR5XaMmMWdxOVi8385PLpByn E/O5WhMsHLvDBDcmUFvSEBG08jBSq6LjIkgwV1Bf+j33ocpUvmt4+vvljJI1lHX8UUqK 0knAjZ61PyQ7e0qOT6M/ZBN+bdOB8TBJJv+4A= 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=IMxqo/U0nw6DmpEA9S3YJIdfMVgNoxeRFMQ95NzIcMY=; b=f2d7wxZrBYpRjlV3MTad9tRfsp8Z6IhyAtghytYIb3LBf6rzZZpySVXbPegw2lo8zP xW1gXX71+eMdMW1+Z+8ZUpQYzGpssZVr7v37afcl6YVE+v+oWJb+tOKw0oC8cwnvjUl/ 5y9+q5xJ87xNFGhTnEhJ721KDNG06VcBmqYqM3PFe7WVb3LnzY/1s+vO3wg243txuSQb OnMwvgNCWhof95IV2kJurH6OStyoOrscUOkSQ2zLZ/IKzO05Mb2PlLIK4VpLboBL3hy+ 5ap2siRc81MLe4zj5RSWu0djhYSbxic9ASP45+HWXJmzkMgoqcs5ZHlnhPeeis/uwslu jXYQ== X-Gm-Message-State: APjAAAWzZOFIGH3JWDNrnUsDXzyYLQpGhGEMxjK3UpV6XyQBElw2VUjv s1ZjxgXeddFTJ5ek76nYhyRKm94r6Lo= X-Received: by 2002:ac2:4a6e:: with SMTP id q14mr6496524lfp.80.1565205430686; Wed, 07 Aug 2019 12:17:10 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id q4sm21075569lje.99.2019.08.07.12.17.09 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 12:17:09 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id r9so86524498ljg.5 for ; Wed, 07 Aug 2019 12:17:09 -0700 (PDT) X-Received: by 2002:a2e:9b83:: with SMTP id z3mr5553524lji.84.1565205428980; Wed, 07 Aug 2019 12:17:08 -0700 (PDT) MIME-Version: 1.0 References: <48890b55-afc5-ced8-5913-5a755ce6c1ab@shipmail.org> <20190806073831.GA26668@infradead.org> <20190806190937.GD30179@bombadil.infradead.org> <20190807064000.GC6002@infradead.org> In-Reply-To: <20190807064000.GC6002@infradead.org> From: Linus Torvalds Date: Wed, 7 Aug 2019 12:16:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: drm pull for v5.3-rc1 To: Christoph Hellwig Cc: Matthew Wilcox , =?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 11:40 PM Christoph Hellwig wrote: > > I'm not an all that huge fan of super magic macro loops. But in this > case I don't see how it could even work, as we get special callbacks > for huge pages and holes, and people are trying to add a few more ops > as well. Yeah, in this case we definitely don't want to make some magic loop walker. Loops are certainly simpler than callbacks for most cases (and often faster because you don't have indirect calls which now are getting quite expensive), but the walker code really does end up having tons of different cases that you'd have to handle with magic complex conditionals or switch statements instead. So the "walk over range using this set of callbacks" is generally the right interface. If there is some particular case that might be very simple and the callback model is expensive due to indirect calls for each page, then such a case should probably use the normal page walking loops (that we *used* to have everywhere - the "walk_range()" interface is the "new" model for all the random odd special cases). Linus