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: <00ee01d267cc$b61feaa0$225fbfe0$@alibaba-inc.com>
Date:   Fri, 06 Jan 2017 11:26:46 +0800
From:   "Hillf Danton" <hillf.zj@...baba-inc.com>
To:     "'Mel Gorman'" <mgorman@...hsingularity.net>,
        "'Jesper Dangaard Brouer'" <brouer@...hat.com>
Cc:     "'Linux Kernel'" <linux-kernel@...r.kernel.org>,
        "'Linux-MM'" <linux-mm@...ck.org>
Subject: Re: [PATCH 3/4] mm, page_allocator: Only use per-cpu allocator for irq-safe requests


On Wednesday, January 04, 2017 7:11 PM Mel Gorman wrote: 
> @@ -2647,9 +2644,8 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
>  	struct list_head *list;
>  	bool cold = ((gfp_flags & __GFP_COLD) != 0);
>  	struct page *page;
> -	unsigned long flags;
> 
> -	local_irq_save(flags);
> +	preempt_disable();
>  	pcp = &this_cpu_ptr(zone->pageset)->pcp;
>  	list = &pcp->lists[migratetype];
>  	page = __rmqueue_pcplist(zone,  order, gfp_flags, migratetype,
> @@ -2658,7 +2654,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
>  		__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
>  		zone_statistics(preferred_zone, zone, gfp_flags);
>  	}
> -	local_irq_restore(flags);
> +	preempt_enable();
>  	return page;
>  }
> 
With PREEMPT configured, preempt_enable() adds entry point to schedule().
Is that needed when we try to allocate a page?

Hillf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ