From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id 75AE99000C6 for ; Mon, 3 Oct 2011 09:35:19 -0400 (EDT) Received: by qyl38 with SMTP id 38so2231485qyl.14 for ; Mon, 03 Oct 2011 06:35:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20111003192458.14d198a3.kamezawa.hiroyu@jp.fujitsu.com> Date: Mon, 3 Oct 2011 21:35:17 +0800 Message-ID: Subject: Re: One comment on the __release_region in kernel/resource.c From: Wei Yang Content-Type: multipart/alternative; boundary=bcaec5395f1ea7319d04ae650b0c Sender: owner-linux-mm@kvack.org List-ID: To: Geert Uytterhoeven Cc: KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, linux-mm@kvack.org --bcaec5395f1ea7319d04ae650b0c Content-Type: text/plain; charset=ISO-8859-1 2011/10/3 Geert Uytterhoeven > On Mon, Oct 3, 2011 at 12:24, KAMEZAWA Hiroyuki > wrote: > > On Sun, 2 Oct 2011 21:57:07 +0800 > > Wei Yang wrote: > > > >> Dear experts, > >> > >> I am viewing the source code of __release_region() in kernel/resource.c. > >> And I have one comment for the performance issue. > >> > >> For example, we have a resource tree like this. > >> 10-89 > >> 20-79 > >> 30-49 > >> 55-59 > >> 60-64 > >> 65-69 > >> 80-89 > >> 100-279 > >> > >> If the caller wants to release a region of [50,59], the original code > will > ^^^^^^^ > Do you really mean [50,59]? > Yes. > I don't think that's allowed, as the tree has [55,59], so you would release > a > larger region that allocated. > So you mean the case I mentioned will not happen? Actually, I believe every developer should pass the resource region which has been allocated. While if some one made a mistake and pass a region which is not allocated before and overlap some "BUSY" region? > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. > But > when I'm talking to journalists I just say "programmer" or something like > that. > -- Linus Torvalds > -- Wei Yang Help You, Help Me --bcaec5395f1ea7319d04ae650b0c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2011/10/3 Geert Uytterhoeven <geert@linux-m68k.org>
On Mon, Oct 3, 2011 at 12:24, KAMEZAWA Hiroyuki
<
kamezawa.hiroyu@jp.fu= jitsu.com> wrote:
> On Sun, 2 Oct 2011 21:57:07 +0800
> Wei Yang <weiyang.kerne= l@gmail.com> wrote:
>
>> Dear experts,
>>
>> I am viewing the source code of __release_region() in kernel/resou= rce.c.
>> And I have one comment for the performance issue.
>>
>> For example, we have a resource tree like this.
>> 10-89
>> =A0 =A020-79
>> =A0 =A0 =A0 =A030-49
>> =A0 =A0 =A0 =A055-59
>> =A0 =A0 =A0 =A060-64
>> =A0 =A0 =A0 =A065-69
>> =A0 =A080-89
>> 100-279
>>
>> If the caller wants to release a region of [50,59], the original c= ode will
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0^^^^^^^
Do you really mean [50,59]?
Yes.
I don't think that's allowed, as the tree has [55,59], so you would= release a
larger region that allocated.
So you mean the case I m= entioned will not happen?
Actually, I believe every developer should pas= s the resource region which has been allocated.
While if some one made a= mistake and pass a region which is not allocated before and overlap
some "BUSY" region?
=A0

Gr{oetje,eeting}s,

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. Bu= t
when I'm talking to journalists I just say "programmer" or so= mething like that.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0=A0 -- Linus = Torvalds



--
Wei Yang
Help= You, Help Me

--bcaec5395f1ea7319d04ae650b0c-- -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org