linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Steve Longerbeam <stevel@mvista.com>
Cc: Andi Kleen <ak@suse.de>, linux-mm <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: BUG in shared_policy_replace() ?
Date: Wed, 19 Jan 2005 12:37:54 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0501191221400.4795-100000@localhost.localdomain> (raw)
In-Reply-To: <41EDAA6E.5000900@mvista.com>

On Tue, 18 Jan 2005, Steve Longerbeam wrote:
> 
> Why free the shared policy created to split up an old
> policy that spans the whole new range? Ie, see patch.

I think you're misreading it.  That code comes from when I changed it
over from sp->sem to sp->lock.  If it finds that it needs to split an
existing range, so needs to allocate a new2, then it has to drop and
reacquire the spinlock around that.  It's conceivable that a racing
task could change the tree while the spinlock is dropped, in such a
way that this split is no longer necessary once we reacquire the
spinlock.  The code you're looking at frees up new2 in that case;
whereas in the normal case, where it is still needed, there's a
new2 = NULL after inserting it, so that it won't be freed below.

Hugh

--
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-01-19 12:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19  0:31 Steve Longerbeam
2005-01-19 12:37 ` Hugh Dickins [this message]
2005-01-19 17:32   ` Steve Longerbeam
2005-01-19 17:45     ` Andi Kleen
2005-01-19 18:22       ` Steve Longerbeam
2005-01-19 18:34         ` Andi Kleen
2005-01-19 18:59           ` Steve Longerbeam
2005-01-19 19:09             ` Andi Kleen
2005-01-19 19:25               ` Steve Longerbeam
2005-01-19 19:29                 ` Andi Kleen
2005-01-19 21:39                   ` Andrew Morton

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=Pine.LNX.4.44.0501191221400.4795-100000@localhost.localdomain \
    --to=hugh@veritas.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=stevel@mvista.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox