public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: hugh@veritas.com, ak@suse.de, 76306.1226@compuserve.com,
	andrea@novell.com, linux-kernel@vger.kernel.org
Subject: Re: Dropped patch: mm/mempolicy.c:sp_lookup()
Date: Thu, 18 Nov 2004 06:05:04 +0100	[thread overview]
Message-ID: <20041118050504.GA1478@wotan.suse.de> (raw)
In-Reply-To: <20041117122916.5965f2d5.akpm@osdl.org>

> Some optimizations in mempolicy.c (like to avoid rebalancing the tree while
> destroying it and by breaking loops early and not checking for invariant
> conditions in the replace operation).

[...]
> 
> diff -puN mm/mempolicy.c~mempolicy-optimization mm/mempolicy.c
> --- 25/mm/mempolicy.c~mempolicy-optimization	2004-11-17 12:26:40.149947024 -0800
> +++ 25-akpm/mm/mempolicy.c	2004-11-17 12:26:40.153946416 -0800
> @@ -1211,12 +1211,10 @@ restart:
>  						return -ENOMEM;
>  					goto restart;
>  				}
> -				n->end = end;
> +				n->end = start;
>  				sp_insert(sp, new2);
> -				new2 = NULL;
> -			}
> -			/* Old crossing beginning, but not end (easy) */
> -			if (n->start < start && n->end > start)
> +				break;
> +			} else
>  				n->end = start;
>  		}
>  		if (!next)

I'm not quite sure about this one.

> @@ -1270,11 +1268,11 @@ void mpol_free_shared_policy(struct shar
>  	while (next) {
>  		n = rb_entry(next, struct sp_node, nd);
>  		next = rb_next(&n->nd);
> -		rb_erase(&n->nd, &p->root);
>  		mpol_free(n->policy);
>  		kmem_cache_free(sn_cache, n);
>  	}
>  	spin_unlock(&p->lock);
> +	p->root = RB_ROOT;
>  }

This hunk is fine.

-Andi

  reply	other threads:[~2004-11-18  5:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-17  3:54 Dropped patch: mm/mempolicy.c:sp_lookup() Chuck Ebbert
2004-11-17 12:08 ` Andi Kleen
2004-11-17 19:13   ` Andrew Morton
2004-11-17 20:06     ` Hugh Dickins
2004-11-17 20:21       ` Andrew Morton
2004-11-17 20:29         ` Andrew Morton
2004-11-18  5:05           ` Andi Kleen [this message]
2004-11-18  3:08         ` Andrea Arcangeli
2004-11-18  3:08       ` Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2004-11-16  4:15 Chuck Ebbert
2004-11-17  1:00 ` Andi Kleen

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=20041118050504.GA1478@wotan.suse.de \
    --to=ak@suse.de \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=andrea@novell.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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