lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHF2byaRlaX3W6Md@casper.infradead.org>
Date:   Sat, 27 May 2023 04:18:07 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     John Hubbard <jhubbard@...dia.com>
Cc:     David Hildenbrand <david@...hat.com>,
        Khalid Aziz <khalid.aziz@...cle.com>,
        Steven Sistare <steven.sistare@...cle.com>,
        akpm@...ux-foundation.org, ying.huang@...el.com,
        mgorman@...hsingularity.net, baolin.wang@...ux.alibaba.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Khalid Aziz <khalid@...nel.org>
Subject: Re: [PATCH v4] mm, compaction: Skip all non-migratable pages during
 scan

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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ