Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500482

Re: [PATCH] Don't touch single threaded PTEs which are on the right node

From Andi Kleen <ak@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Don't touch single threaded PTEs which are on the right node
Date 2016-10-13 20:10 +0200
Message-ID <srSC6-71Q-13@gated-at.bofh.it> (permalink)
References <sruq5-6PD-21@gated-at.bofh.it> <srJIt-152-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> >  	do {
> >  		oldpte = *pte;
> > @@ -94,6 +100,13 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
> >  				/* Avoid TLB flush if possible */
> >  				if (pte_protnone(oldpte))
> >  					continue;
> > +
> > +				/*
> > +				 * Don't mess with PTEs if page is already on the node
> > +				 * a single-threaded process is running on.
> > +				 */
> > +				if (target_node == page_to_nid(page))
> > +					continue;
> >  			}
> >  
> 
> Check target_node != NUMA_NODE && target_node == page_to_nid(page) to
> avoid unnecessary page->flag masking and shifts?

I didn't do this last change because I expect a potentially mispredicted
check is more expensive than some shifting/masking.

-Andi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Don't touch single threaded PTEs which are on the right node Andi Kleen <andi@firstfloor.org> - 2016-10-12 18:20 +0200
  Re: [PATCH] Don't touch single threaded PTEs which are on the right  node Mel Gorman <mgorman@suse.de> - 2016-10-13 10:40 +0200
    Re: [PATCH] Don't touch single threaded PTEs which are on the right  node Andi Kleen <ak@linux.intel.com> - 2016-10-13 20:10 +0200
      Re: [PATCH] Don't touch single threaded PTEs which are on the right  node Mel Gorman <mgorman@suse.de> - 2016-10-13 20:20 +0200

csiph-web