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]
Date:   Mon, 23 Jan 2017 11:17:59 +0000
From:   Mel Gorman <mgorman@...hsingularity.net>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        Hillf Danton <hillf.zj@...baba-inc.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH 4/4] mm, page_alloc: Only use per-cpu allocator for
 irq-safe requests

On Fri, Jan 20, 2017 at 04:02:56PM +0100, Vlastimil Babka wrote:
> On 01/17/2017 10:29 AM, Mel Gorman wrote:
> 
> [...]
> 
> > @@ -1244,10 +1243,8 @@ static void __free_pages_ok(struct page *page, unsigned int order)
> >  		return;
> >  
> >  	migratetype = get_pfnblock_migratetype(page, pfn);
> > -	local_irq_save(flags);
> > -	__count_vm_events(PGFREE, 1 << order);
> > +	count_vm_events(PGFREE, 1 << order);
> 
> Maybe this could be avoided by moving the counting into free_one_page()?
> Diff suggestion at the end of e-mail.
> 

Yes, that would work.

> > @@ -2472,16 +2470,20 @@ void free_hot_cold_page(struct page *page, bool cold)
> >  {
> >  	struct zone *zone = page_zone(page);
> >  	struct per_cpu_pages *pcp;
> > -	unsigned long flags;
> >  	unsigned long pfn = page_to_pfn(page);
> >  	int migratetype;
> >  
> >  	if (!free_pcp_prepare(page))
> >  		return;
> >  
> > +	if (in_interrupt()) {
> > +		__free_pages_ok(page, 0);
> > +		return;
> > +	}
> 
> I think this should go *before* free_pcp_prepare() otherwise
> free_pages_prepare() gets done twice in interrupt.
> 

You're right, thanks.

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ