Re: [Nouveau] [PATCH 17/18] dma-iommu: implement ->alloc_noncoherent

2020-09-26 Thread Tomasz Figa
On Sat, Sep 26, 2020 at 4:14 PM Christoph Hellwig wrote: > > On Fri, Sep 25, 2020 at 06:46:22PM +, Tomasz Figa wrote: > > > +static void *iommu_dma_alloc_noncoherent(struct device *dev, size_t size, > > > + dma_addr_t *handle, enum dma_data_direction dir, gfp_t gfp) > > > +{ > > > +

Re: [Nouveau] [PATCH 17/18] dma-iommu: implement ->alloc_noncoherent

2020-09-26 Thread Christoph Hellwig
On Fri, Sep 25, 2020 at 06:46:22PM +, Tomasz Figa wrote: > > +static void *iommu_dma_alloc_noncoherent(struct device *dev, size_t size, > > + dma_addr_t *handle, enum dma_data_direction dir, gfp_t gfp) > > +{ > > + if (!gfpflags_allow_blocking(gfp)) { > > + struct page *pa

Re: [Nouveau] [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-26 Thread Christoph Hellwig
On Fri, Sep 25, 2020 at 01:44:41PM -0700, Ralph Campbell wrote: > error = ___wait_var_event(&page->_refcount, > - atomic_read(&page->_refcount) == 1, > + dax_layout_is_idle_page(page), > TASK_INTERRU

Re: [Nouveau] [PATCH 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2020-09-26 Thread Christoph Hellwig
On Fri, Sep 25, 2020 at 01:44:42PM -0700, Ralph Campbell wrote: > ZONE_DEVICE struct pages have an extra reference count that complicates the > code for put_page() and several places in the kernel that need to check the > reference count to see that a page is not being used (gup, compaction, > migr