Re: [PATCH v4] mm, compaction: Skip all non-migratable pages during scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 26, 2023 at 07:11:05PM -0700, John Hubbard wrote:
> > So any user with 1024 processes can fragment physical memory? :/
> > 
> > Sorry, I'd like to minimize the usage of folio_maybe_dma_pinned().
> 
> I was actually thinking that we should minimize any more cases of
> fragile mapcount and refcount comparison, which then leads to
> Matthew's approach here!

I was wondering if we shouldn't make folio_maybe_dma_pinned() a little
more accurate.  eg:

        if (folio_test_large(folio))
                return atomic_read(&folio->_pincount) > 0;
	return (unsigned)(folio_ref_count(folio) - folio_mapcount(folio)) >=
			GUP_PIN_COUNTING_BIAS;




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux