From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Paul Menage <menage@google.com>
Cc: akpm@linux-foundation.org, containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Priority heap infrastructure enhancements
Date: Sat, 21 Jun 2008 13:35:38 +0530 [thread overview]
Message-ID: <485CB652.90801@linux.vnet.ibm.com> (raw)
In-Reply-To: <6599ad830806210029x2a020e1ava6b646be9913fcdf@mail.gmail.com>
Paul Menage wrote:
> On Wed, Jun 18, 2008 at 6:48 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>> Some of the common code has been factored into heap_adjust() a.k.a heapify
>> in data structures terminology.
>>
>> I am sending out this patch indepedent of the memory controller changes as
>> they deserve to be reviewed independently.
>>
>> One limitation of the current heap_insert() routine is that it does not
>> insert an element which is greater than the root, when the heap slots
>> are fully used. I'll work on and review that interface and find a suitable
>> way to address that issue
>
> How else would you want it to behave? If you have a fixed size heap
> and it's full, then you have to drop the largest value. (Well, you
> could in theory drop the smallest value, but there's no quick way to
> find that.)
>
I would like to be able to drop the smallest value. Since we cannot drop the
smallest value, dropping a leaf (heap->size) should be sufficiently good enough.
I want a max heap and losing the root of the heap does not work for me.
>> Comments, Flames? Please do review closely!
>>
>> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
>
> Looks fine.
>
> Reviewed-by: Paul Menage <menage@google.com>
Thanks for the review!
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
next prev parent reply other threads:[~2008-06-21 8:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 13:48 [PATCH] Priority heap infrastructure enhancements Balbir Singh
2008-06-21 7:29 ` Paul Menage
2008-06-21 8:05 ` Balbir Singh [this message]
2008-06-21 8:11 ` Paul Menage
2008-06-21 8:54 ` Balbir Singh
2008-06-21 16:03 ` Paul Menage
2008-07-01 8:14 ` Andrew Morton
2008-07-01 8:33 ` Balbir Singh
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=485CB652.90801@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.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