On Thu, 2005-06-30 at 11:53 -0700, Chandra Seetharaman wrote:
> On Thu, 2005-06-30 at 11:23 -0700, Dave Hansen wrote:
> > On Thu, 2005-06-30 at 11:11 -0700, Chandra Seetharaman wrote:
> > > i don't understand why you think it is a problem to call kfree with lock
> > > held( i agree calling kmalloc with wait flag when a lock is being held
> > > is not correct).
> >
> > kfree->__cache_free
> > ->cache_flusharray
> > ->free_block
> > ->slab_destroy
> > ->kmem_freepages
> > ->free_pages
> > ->__free_pages
> > ->__free_pages_ok
> > ->free_pages_bulk:
> >
> > spin_lock_irqsave(&zone->lock, flags);
> >
> Oh.... I did not realize Takashi was mentioning zone->lock... i assumed
> zone->lru_lock...
>
> memory controller does not use zone->lock, it only uses zone->lru_lock..
> I 'll look thru to see if that leads to a deadlock...
static int
free_pages_bulk(struct zone *zone, int count,
struct list_head *list, unsigned int order)
{
...
spin_lock_irqsave(&zone->lock, flags);
while (!list_empty(list) && count--) {
__free_pages_bulk(page, zone, order);
/* can't call the allocator in here: /*
ckrm_clear_page_class(page);
}
spin_unlock_irqrestore(&zone->lock, flags);
return ret;
}
See?
-- Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech