lkml.org 
[lkml]   [2005]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] Swap Migration V5: LRU operations
From
Date
On Tue, 2005-11-15 at 08:38 -0800, Christoph Lameter wrote:
> On Mon, 14 Nov 2005, Andrew Morton wrote:
>
> > > +int isolate_lru_page(struct page *page)
> > > +{
> > > + int rc = 0;
> > > + struct zone *zone = page_zone(page);
> > > +
> > > +redo:
> > > + spin_lock_irq(&zone->lru_lock);
> > > + rc = __isolate_lru_page(zone, page);
> > > + spin_unlock_irq(&zone->lru_lock);
> > > + if (rc == 0) {
> > > + /*
> > > + * Maybe this page is still waiting for a cpu to drain it
> > > + * from one of the lru lists?
> > > + */
> > > + smp_call_function(&lru_add_drain_per_cpu, NULL, 0 , 1);
> >
> > lru_add_drain() ends up doing spin_unlock_irq(), so we'll enable interrupts
> > within the smp_call_function() handler. Is that legal on all
> > architectures?
>
> isolate_lru_pages() is only called within a process context in the swap
> migration patches. The hotplug folks may have to address this if they want
> to isolate pages from interrupts etc.
>

I believe Andrew is refering to the calls from the interprocessor
interrupt handlers triggered by the smp_call_function(). Looks like
ia64 runs IPI handlers with interrupts enabled [SA_INTERRUPT], so should
be OK there, but maybe not for all archs?

Lee

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

\
 
 \ /
  Last update: 2005-11-15 19:11    [W:0.067 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site