Re: [PATCH -mm 16/25] SHM_LOCKED pages are non-reclaimable

From: Andrew Morton
Date: Tue Jun 10 2008 - 17:49:53 EST


On Tue, 10 Jun 2008 17:22:26 -0400
Lee Schermerhorn <Lee.Schermerhorn@xxxxxx> wrote:

> > Or mark it unevictable again if it still is.
> >
> > > > + * scan_mapping_noreclaim_pages - scan an address space for reclaimable pages
> > > > + * @mapping: struct address_space to scan for reclaimable pages
> > > > + *
> > > > + * Scan all pages in mapping. Check non-reclaimable pages for
> > > > + * reclaimability and move them to the appropriate zone lru list.
> > > > + */
> > > > +void scan_mapping_noreclaim_pages(struct address_space *mapping)
> > > > +{
> >
> > > This function can spend fantastically large amounts of time under
> > > spin_lock_irq().
>
> Yes, if we get a run of pages from the same zone [likely, I think],
> we'll hold the lock over a full "batch" of PAGEVEC_SIZE [14] pages. I
> haven't measured the hold time, but can do.

oh. I misread the code. Holding spin_lock_irq() across a single
pagevec should be OK. At least, we do that in lots of other places.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/