public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 1/2] vmap: cope with vm_unmap_aliases before vmalloc_init()
Date: Wed, 05 Nov 2008 10:52:12 -0800	[thread overview]
Message-ID: <4911EB5C.4030901@goop.org> (raw)
In-Reply-To: <4906CBCA.6060908@goop.org>

Jeremy Fitzhardinge wrote:
> Xen can end up calling vm_unmap_aliases() before vmalloc_init() has
> been called.  In this case its safe to make it a simple no-op.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

Ping?  Nick, Ingo: do you want to pick these up, or shall I send them to 
Linus myself?

Thanks,
    J

> ---
> mm/vmalloc.c |    7 +++++++
> 1 file changed, 7 insertions(+)
>
> ===================================================================
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -592,6 +592,8 @@
>
> #define VMAP_BLOCK_SIZE        (VMAP_BBMAP_BITS * PAGE_SIZE)
>
> +static bool vmap_initialized __read_mostly = false;
> +
> struct vmap_block_queue {
>     spinlock_t lock;
>     struct list_head free;
> @@ -828,6 +830,9 @@
>     int cpu;
>     int flush = 0;
>
> +    if (unlikely(!vmap_initialized))
> +        return;
> +
>     for_each_possible_cpu(cpu) {
>         struct vmap_block_queue *vbq = &per_cpu(vmap_block_queue, cpu);
>         struct vmap_block *vb;
> @@ -941,6 +946,8 @@
>         INIT_LIST_HEAD(&vbq->dirty);
>         vbq->nr_dirty = 0;
>     }
> +
> +    vmap_initialized = true;
> }
>
> void unmap_kernel_range(unsigned long addr, unsigned long size)
>
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2008-11-05 18:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 23:48 vm_unmap_aliases and Xen Jeremy Fitzhardinge
2008-10-28  5:19 ` Nick Piggin
2008-10-28  8:04   ` Jeremy Fitzhardinge
2008-10-28  8:22   ` [PATCH 1/2] vmap: cope with vm_unmap_aliases before vmalloc_init() Jeremy Fitzhardinge
2008-11-05 18:52     ` Jeremy Fitzhardinge [this message]
2008-11-06 10:02       ` Ingo Molnar
2008-11-06 10:41         ` Nick Piggin
2008-11-06 14:51           ` Ingo Molnar
2008-10-28  8:23   ` [PATCH 2/2] xen: make sure stray alias mappings are gone before pinning Jeremy Fitzhardinge

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=4911EB5C.4030901@goop.org \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    /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