All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: "Chandra S. Seetharaman [imap]" <sekharan@us.ibm.com>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	ckrm-tech@lists.sourceforge.net, linux-mm <linux-mm@kvack.org>
Subject: Re: [ckrm-tech] [PATCH 4/6] CKRM: Add guarantee support for mem controller
Date: Thu, 30 Jun 2005 12:02:04 -0700	[thread overview]
Message-ID: <1120158124.12143.68.camel@localhost> (raw)
In-Reply-To: <1120157624.14910.42.camel@linuxchandra>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2005-06-30 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24 22:25 [PATCH 4/6] CKRM: Add guarantee support for mem controller Chandra Seetharaman
2005-06-30  5:52 ` [ckrm-tech] " YAMAMOTO Takashi
2005-06-30 18:11   ` Chandra Seetharaman
2005-06-30 18:23     ` Dave Hansen
2005-06-30 18:53       ` Chandra Seetharaman
2005-06-30 19:02         ` Dave Hansen [this message]
2005-06-30 19:21           ` Chandra Seetharaman
2005-06-30 19:29             ` Dave Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1120158124.12143.68.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=linux-mm@kvack.org \
    --cc=sekharan@us.ibm.com \
    --cc=yamamoto@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.