From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH v2 6/9] dmapool: improve scalability of dma_pool_free Date: Fri, 3 Aug 2018 14:02:15 -0700 Message-ID: <20180803210215.GA9329@bombadil.infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tony Battersby Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chaitra P B , Suganath Prabu Subramani , Sathya Prakash , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, MPT-FusionLinux.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, Christoph Hellwig List-Id: linux-scsi@vger.kernel.org On Fri, Aug 03, 2018 at 04:05:35PM -0400, Tony Battersby wrote: > For v3 of the patchset, I was also considering to add a note to the > kernel-doc comments for dma_pool_create() to use dma_alloc_coherent() > directly instead of a dma pool if the driver intends to allow userspace > to mmap() the returned pages, due to the new use of the _mapcount union > in struct page.=A0 Would you consider that useful information or pointless > trivia? If userspace is going to map the pages, it's going to expose other things to userspace than the dma pages. I'd suggest they not do this; they should do their own sub-allocation which only exposes to an individual task the data they're sure is OK for each task to see.