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

Re: [Xen-devel] alloc_heap_pages is low efficient with more CPUs


  • To: tupeng212 <tupeng212@xxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Sat, 13 Oct 2012 09:59:45 +0100
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Sat, 13 Oct 2012 09:00:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac2pIRcWEdxf/Aiulk6RYcpdwngjPA==
  • Thread-topic: [Xen-devel] alloc_heap_pages is low efficient with more CPUs

On 13/10/2012 08:20, "tupeng212" <tupeng212@xxxxxxxxx> wrote:

> /* Allocate 2^@order contiguous pages. */
> static struct page_info *alloc_heap_pages(
>     unsigned int zone_lo, unsigned int zone_hi,
>     unsigned int node, unsigned int order, unsigned int memflags)
> {
>     cpus_clear(mask);
>     for ( i = 0; i < (1 << order); i++ )
>     {    
>         if ( pg[i].u.free.need_tlbflush )
>         {
>             /* Add in extra CPUs that need flushing because of this page. */
>             cpus_andnot(extra_cpus_mask, cpu_online_map, mask);
>             tlbflush_filter(extra_cpus_mask, pg[i].tlbflush_timestamp);
>             cpus_or(mask, mask, extra_cpus_mask);
>         }
>     }
>     if ( unlikely(!cpus_empty(mask)) )
>     {
>         perfc_incr(need_flush_tlb_flush);
>         flush_tlb_mask(&mask);
>     }
>     return pg;
> }
>  
> Is this equal to : in pg[1<<order-1].u.free.need_tlbflush, if we compute
> mask=0, then flush TLB mask ?

No!

 -- Keir




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.