public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Jeremy Fitzhardinge" <jeremy@goop.org>
Cc: <mingo@elte.hu>, <tglx@linutronix.de>,
	<linux-kernel@vger.kernel.org>, <hpa@zytor.com>
Subject: Re: [PATCH] i386: fix vmalloc_sync_all() for Xen
Date: Fri, 20 Jun 2008 07:58:20 +0100	[thread overview]
Message-ID: <485B712C.76E4.0078.0@novell.com> (raw)
In-Reply-To: <485AA296.6070008@goop.org>

>I think it would be better to separately test whether the vmalloc 
>mapping is present in the init_mm and skip the syncing loop in that 
>case, rather than this somewhat convoluted logic to overload the test in 
>vmalloc_sync_one.

That's what the x86-64 code does. When I wrote this originally, I tried
to keep the pre-existing logic as much as possible, so I split out
vmalloc_sync_one() by mostly moving existing code. I certainly agree
that this has room for cleaning up (and then possibly including unification
with x86-64).

>>>> This is a replacement of the BUG_ON() that an earlier patch from you
>>>> removed: Failure of vmalloc_sync_one() must happen on the first
>>>> entry or never, and this is what is being checked for here.
>>>>   
>>>>       
>>> Could you add a comment?
>>>     
>>
>> Sure, though there was none originally, and the intention seemed
>> quite clear to me.
>
>Well, looks to me like vmalloc_sync_one can only return NULL iff the 
>vmalloc mapping is absent in init_mm, so that's going to be invariant 

Correct.

>with respect to any other pgd you pass in.  So I don't think the BUG_ON 
>will ever fire, and it's unclear what actual logical property it's 
>testing for.

My point of adding the BUG_ON() is that in vmalloc_sync_all() it is not
clear that vmalloc_sync_one() can fail only due to init_mm's page table
not being appropriately populated. So yes, this BUG_ON() is not
expected to ever fire - but isn't that a property of all BUG_ON()'s?

Jan


  reply	other threads:[~2008-06-20  6:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 11:40 [PATCH] i386: fix vmalloc_sync_all() for Xen Jan Beulich
2008-06-18 20:01 ` Jeremy Fitzhardinge
2008-06-19  9:43   ` Jan Beulich
2008-06-19 12:27     ` Ingo Molnar
2008-06-19 15:28       ` Jeremy Fitzhardinge
2008-06-19 14:45     ` Jeremy Fitzhardinge
2008-06-19 16:01       ` Jan Beulich
2008-06-19 18:16         ` Jeremy Fitzhardinge
2008-06-20  6:58           ` Jan Beulich [this message]
2008-06-20 16:10             ` 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=485B712C.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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