Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1355731ybf; Thu, 27 Feb 2020 09:23:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyeEdi/bfZ1UTI4Bk82ZnDG13f9njd9HuhqtC19txO8Nu9Lb5EynkF7lV+1oCGZjpZbc3Vs X-Received: by 2002:a9d:600e:: with SMTP id h14mr628909otj.113.1582824203320; Thu, 27 Feb 2020 09:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582824203; cv=none; d=google.com; s=arc-20160816; b=VuaaVhZgedby1hFMZQy8hKhOxghnM1N5+8b2u1QjFPapTJngc9nApFe+vALm18icuq tAl0x3i6l5rTGW3VN+mRiGyAlGHBFnI9g5juROVU94y+7kSHy8cEr0wyWTHAa+Wmg1Rf rBm25eyG1AdjJntC7TEXtf3mGIY4p5oZ9wYxdxYd4SRIn4qsgFiOkdnNzLEHfjyZ3ASu J8jxl8ilV8FXXatEyGw2Gfz9HTkD2FzN6MTHxvLJb7s1ibDC4WQTDBgeMEQkTXsVYvOa Asj1LUmGE+tUBqnptO52PhZAR2lvwOmfNn1Q60x3x3+hCoWMnH9wUnV1QhQo4TW+XzsN PIIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=rGIcKpriw4hzuSTk33qOm4pbDT/oAsDQ1KXgtcrmruI=; b=ZNDMS0ex0osX2cm4hYrXBzyNl0YkQGyH17AjbvwIWznfQ1Wo4qMpTVdVnRSpP3YmgE SJBDwyMjyW+JJTBgSYv57UVbmNqpvmt89l13hy/h1rB262Fb/lJQnaM7peHpWLa9wxY4 gp3jDt2ZpmtvtjEt0t5GLOydRBhKcvzrPSurjPEIw5567bEEiamwXe792u5BmZYnyREO kjWpn2pL/qU4ZgCyqbLMpbZqxjHmmw/BRq7oj6FI6mYcXACTUPHtSiRla5TrDj49srXE xdQzz1ptkFr+xJEpjiDngqlzQjB+LBPEa/0zvqxcpk/ed0ixAt1JLeKmprtchKB9ERuH +ryw== ARC-Authentication-Results: i=1; mx.google.com; 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 n18si2053174otf.231.2020.02.27.09.23.07; Thu, 27 Feb 2020 09:23:23 -0800 (PST) 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; 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 S1729648AbgB0RXE (ORCPT + 99 others); Thu, 27 Feb 2020 12:23:04 -0500 Received: from ale.deltatee.com ([207.54.116.67]:56590 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728413AbgB0RXD (ORCPT ); Thu, 27 Feb 2020 12:23:03 -0500 Received: from s0106ac1f6bb1ecac.cg.shawcable.net ([70.73.163.230] helo=[192.168.11.155]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7MrE-0003nL-Q0; Thu, 27 Feb 2020 10:21:57 -0700 To: Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-mm@kvack.org, Dan Williams , Michal Hocko , David Hildenbrand , Andrew Morton , Christoph Hellwig , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Eric Badger References: <20200221182503.28317-1-logang@deltatee.com> <20200227171704.GK31668@ziepe.ca> From: Logan Gunthorpe Message-ID: Date: Thu, 27 Feb 2020 10:21:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200227171704.GK31668@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.73.163.230 X-SA-Exim-Rcpt-To: ebadger@gigaio.com, peterz@infradead.org, luto@kernel.org, dave.hansen@linux.intel.com, bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, benh@kernel.crashing.org, will@kernel.org, catalin.marinas@arm.com, hch@lst.de, akpm@linux-foundation.org, david@redhat.com, mhocko@kernel.org, dan.j.williams@intel.com, linux-mm@kvack.org, platform-driver-x86@vger.kernel.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-ia64@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-27 10:17 a.m., Jason Gunthorpe wrote: >> Instead of this, this series proposes a change to arch_add_memory() >> to take the pgprot required by the mapping which allows us to >> explicitly set pagetable entries for P2PDMA memory to WC. > > Is there a particular reason why WC was selected here? I thought for > the p2pdma cases there was no kernel user that touched the memory? Yes, that's correct. I choose WC here because the existing users are registering memory blocks without side effects which fit the WC semantics well. > I definitely forsee devices where we want UC instead. Yes. My expectation is that once we have a kernel user that needs this, we'd wire the option through struct dev_pagemap so the caller can choose the mapping that makes sense. Logan