Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2013 15:12:44 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        attilio@FreeBSD.org
Cc:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r250543 - user/attilio/jeff-numa/sys/vm
Message-ID:  <51913B2C.9000505@FreeBSD.org>
In-Reply-To: <CAJ-FndAkZrt1qAQHOR6-bO1JN5KoTsQ7T4MDkcjkQge7dcs0dw@mail.gmail.com>
References:  <201305120153.r4C1r3DN071206@svn.freebsd.org> <51912816.1020603@FreeBSD.org> <CAJ-FndDVrN8STQOmiYM91eyyY5FG1V8OP3wNKdjyuR5yemWaSQ@mail.gmail.com> <519134BB.5030400@FreeBSD.org> <CAJ-FndAkZrt1qAQHOR6-bO1JN5KoTsQ7T4MDkcjkQge7dcs0dw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On 5/13/13 2:59 PM, Attilio Rao wrote:
> On Mon, May 13, 2013 at 8:45 PM, John Baldwin <jhb@freebsd.org> wrote:
>> On 5/13/13 2:23 PM, Attilio Rao wrote:
>>> On Mon, May 13, 2013 at 7:51 PM, John Baldwin <jhb@freebsd.org> wrote:
>>>> On 5/11/13 9:53 PM, Attilio Rao wrote:
>>>>> Author: attilio
>>>>> Date: Sun May 12 01:53:03 2013
>>>>> New Revision: 250543
>>>>> URL: http://svnweb.freebsd.org/changeset/base/250543
>>>>>
>>>>> Log:
>>>>>   Scan all the domains when trying to allocate from freepages.
>>>>>   Some domains may be empty but others may still have some available pages
>>>>>   satisfying the allocations.
>>>>
>>>> It seems like you have nested loops here so you are doing N^2 scans
>>>> rather than N?
>>>
>>> If you want to say so. In most cases N=2 and M=4. However also
>>> consider the less overhead caming from all the adjustement of the
>>> flind because of now split DOMAINS-NFREELISTS concepts.
>>
>> *sigh*
>>
>> No.  Read the code.
> 
> I wrote the code so I certainly read it.
> 
>> vm_phys_alloc_pages() does 'for i = 0; i <
>> vm_ndomains; i++' around calls to vm_phys_alloc_pages_domain() which
>> internally has its _own_ 'for i = 0; i < vm_ndomains; i++'.  Same with
>> vm_phys_alloc_freelist_pages().  You don't need it in both places.
> 
> It is not true.
> vm_phys_alloc_domain_pages() (if this is what you are speaking about)
> doesn't have internally i < vm_ndomains.

Bah, I misread the diff and thought that the change to
vm_phys_alloc_contig() was changing alloc_pages_domain(), my bad.

-- 
John Baldwin


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51913B2C.9000505>