All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
	manish.jaggi@caviumnetworks.com, Tim Deegan <tim@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: Vmap allocator fails to allocate beyond 128MB
Date: Mon, 16 Feb 2015 11:32:33 +0000	[thread overview]
Message-ID: <54E1D551.1010502@linaro.org> (raw)
In-Reply-To: <54E1CD1F.2020706@linaro.org>

On 16/02/15 10:57, Julien Grall wrote:
> On 16/02/15 10:50, Vijay Kilari wrote:
>> On Mon, Feb 16, 2015 at 3:58 PM, Julien Grall <julien.grall@linaro.org> wrote:
>>> On 16/02/15 10:17, Vijay Kilari wrote:
>>>
>>> Hello Vijay,
>>>
>>>>   For ThunderX/arm64 this issue needs to be fixed.
>>>> Could you please comment on this?
>>>
>>> AFAICS, x86 is also using a 1G area for the vmap. Does it mean that x86
>>> never use vmap for more than 128M?
>>
>> I think for x86 there is no problem. It works beyond 128M
> 
> Did you test it? The code seems common enough to make the problem
> appears on x86.

So I've looked at the code and read twice the whole thread.

On a previous mail [1], Jan said that x86 doesn't set the present bit
when it's not required.

The first time that map_pages_to_xen is called to this region (in
vm_init), MAP_SMALL_PAGES is used. Looking to the x86 definition, the
present bit is not set.

On the second call (see vm_alloc), PAGE_HYPERVISOR is used. This define
will set the present bit.

Now about ARM... MAP_SMALL_PAGES is defined as PAGE_HYPERVISOR and the
page is mapped in any case.

So it looks like to me that the buggy code is not the vmap code but the
ARM Xen Page Table code.

IHMO, we have to introduce the concept of mapping region with
non-present bit on ARM. This would allow us to populate the table during
the initialization and allow to map a page (such as the bitmap) in
constant time later.

Regards,

[1] http://lists.xen.org/archives/html/xen-devel/2014-09/msg04307.html

-- 
Julien Grall

      reply	other threads:[~2015-02-16 11:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 12:17 Vmap allocator fails to allocate beyond 128MB Vijay Kilari
2014-09-26 12:46 ` Jan Beulich
2014-09-26 15:23   ` Vijay Kilari
2014-09-26 15:51     ` Jan Beulich
2014-09-29  5:42       ` Vijay Kilari
2014-09-29  6:41         ` Jan Beulich
2014-09-29  7:10           ` Vijay Kilari
2014-09-29  7:26             ` Jan Beulich
2015-02-16 10:17               ` Vijay Kilari
2015-02-16 10:28                 ` Julien Grall
2015-02-16 10:50                   ` Vijay Kilari
2015-02-16 10:57                     ` Julien Grall
2015-02-16 11:32                       ` Julien Grall [this message]

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=54E1D551.1010502@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=manish.jaggi@caviumnetworks.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=vijay.kilari@gmail.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.