lkml.org 
[lkml]   [2016]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] s390/mm: use ipte range to invalidate multiple page table entries
On Wed, 06 Jul 2016 12:03:28 +0800
"Hillf Danton" <hillf.zj@alibaba-inc.com> wrote:

> >
> > +void ptep_invalidate_range(struct mm_struct *mm, unsigned long start,
> > + unsigned long end, pte_t *ptep)
> > +{
> > + unsigned long nr;
> > +
> > + if (!MACHINE_HAS_IPTE_RANGE || mm_has_pgste(mm))
> > + return;
> > + preempt_disable();
> > + nr = (end - start) >> PAGE_SHIFT;
> > + /* If the flush is likely to be local skip the ipte range */
> > + if (nr && !cpumask_equal(mm_cpumask(mm),
> > + cpumask_of(smp_processor_id())))
>
> s/smp/raw_smp/ to avoid adding schedule entry with page table
> lock held?

There can not be a schedule entry with either the page table lock held
or the preempt_disable() a few lines above.

> > + __ptep_ipte_range(start, nr - 1, ptep);
> > + preempt_enable();
> > +}
> > +EXPORT_SYMBOL(ptep_invalidate_range);
> > +
>
> thanks
> Hillf
>


--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

\
 
 \ /
  Last update: 2016-07-06 09:01    [W:0.046 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site