Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Jeff Garzik

Linus Torvalds wrote:

On Thu, 15 Feb 2007, Randy Dunlap wrote:

so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
Has that been requested?  or are there other plans?


It should be fixed now (I had patches from Nick, but got sidetracked by 
trying to fix metacity for the gnome people). 


Wow, good luck with that.  metacity has, among other things, been making 
my web browser (firefox) and my lone game (nethack) behave strangely 
when it comes to opening new windows.


Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Linus Torvalds


On Thu, 15 Feb 2007, Randy Dunlap wrote:
> 
> so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
> Has that been requested?  or are there other plans?

It should be fixed now (I had patches from Nick, but got sidetracked by 
trying to fix metacity for the gnome people). 

I've pushed out, but mirroring delays mean that unless you use 
master.kernel.org you'll need to wait a bit. I think Nick cc'd the kernel 
mailing list, though, so you can look for subjects containing "mincore" if 
you need it fixed before that.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Randy Dunlap
On Wed, 14 Feb 2007 00:19:06 + (GMT) Hugh Dickins wrote:

> On Tue, 13 Feb 2007, Randy Dunlap wrote:
> > From: Randy Dunlap <[EMAIL PROTECTED]>
> > 
> > Don't check for pte swap entries when CONFIG_SWAP=n.
> > And save 'present' in the vec array.
> > 
> > mm/built-in.o: In function `sys_mincore':
> > (.text+0xe584): undefined reference to `swapper_space'
> > 
> > Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
> 
> What you've done there is fine, Randy, thank you.
> 
> But I just got out of bed to take another look, and indeed:
> what is it doing in the none_mapped !vma->vm_file case?
> passing back an uninitialized vector.
> 
> Easy enough to fix, but I'd say Nick's patch has by now exceeded
> its embarrassment quota, and should be reverted from Linus' tree
> for now: clearly none of us have been paying enough attention,
> and other eyes are liable to find further errors lurking in it.
> 
> Hugh


so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
Has that been requested?  or are there other plans?

Thanks.

> > ---
> >  mm/mincore.c |5 +
> >  1 file changed, 5 insertions(+)
> > 
> > --- linux-2.6.20-git9.orig/mm/mincore.c
> > +++ linux-2.6.20-git9/mm/mincore.c
> > @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
> > present = mincore_page(vma->vm_file->f_mapping, pgoff);
> >  
> > } else { /* pte is a swap entry */
> > +#ifdef CONFIG_SWAP
> > swp_entry_t entry = pte_to_swp_entry(pte);
> > if (is_migration_entry(entry)) {
> > /* migration entries are always uptodate */
> > @@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
> > pgoff = entry.val;
> > present = mincore_page(_space, pgoff);
> > }
> > +#else
> > +   present = 1;
> > +#endif
> > }
> > +   vec[i] = present;
> > }
> > pte_unmap_unlock(ptep-1, ptl);
> 
> --

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Randy Dunlap
On Wed, 14 Feb 2007 00:19:06 + (GMT) Hugh Dickins wrote:

 On Tue, 13 Feb 2007, Randy Dunlap wrote:
  From: Randy Dunlap [EMAIL PROTECTED]
  
  Don't check for pte swap entries when CONFIG_SWAP=n.
  And save 'present' in the vec array.
  
  mm/built-in.o: In function `sys_mincore':
  (.text+0xe584): undefined reference to `swapper_space'
  
  Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
 
 What you've done there is fine, Randy, thank you.
 
 But I just got out of bed to take another look, and indeed:
 what is it doing in the none_mapped !vma-vm_file case?
 passing back an uninitialized vector.
 
 Easy enough to fix, but I'd say Nick's patch has by now exceeded
 its embarrassment quota, and should be reverted from Linus' tree
 for now: clearly none of us have been paying enough attention,
 and other eyes are liable to find further errors lurking in it.
 
 Hugh


so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
Has that been requested?  or are there other plans?

Thanks.

  ---
   mm/mincore.c |5 +
   1 file changed, 5 insertions(+)
  
  --- linux-2.6.20-git9.orig/mm/mincore.c
  +++ linux-2.6.20-git9/mm/mincore.c
  @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
  present = mincore_page(vma-vm_file-f_mapping, pgoff);
   
  } else { /* pte is a swap entry */
  +#ifdef CONFIG_SWAP
  swp_entry_t entry = pte_to_swp_entry(pte);
  if (is_migration_entry(entry)) {
  /* migration entries are always uptodate */
  @@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
  pgoff = entry.val;
  present = mincore_page(swapper_space, pgoff);
  }
  +#else
  +   present = 1;
  +#endif
  }
  +   vec[i] = present;
  }
  pte_unmap_unlock(ptep-1, ptl);
 
 --

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Linus Torvalds


On Thu, 15 Feb 2007, Randy Dunlap wrote:
 
 so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
 Has that been requested?  or are there other plans?

It should be fixed now (I had patches from Nick, but got sidetracked by 
trying to fix metacity for the gnome people). 

I've pushed out, but mirroring delays mean that unless you use 
master.kernel.org you'll need to wait a bit. I think Nick cc'd the kernel 
mailing list, though, so you can look for subjects containing mincore if 
you need it fixed before that.

Linus
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-15 Thread Jeff Garzik

Linus Torvalds wrote:

On Thu, 15 Feb 2007, Randy Dunlap wrote:

so, are we going to get a revert of 42da9cbd3eedde33a42acc2cb06f454814cf5de0 ?
Has that been requested?  or are there other plans?


It should be fixed now (I had patches from Nick, but got sidetracked by 
trying to fix metacity for the gnome people). 


Wow, good luck with that.  metacity has, among other things, been making 
my web browser (firefox) and my lone game (nethack) behave strangely 
when it comes to opening new windows.


Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-14 Thread Christoph Lameter
On Wed, 14 Feb 2007, Nick Piggin wrote:

> Can't you have migration without swap?

Yes you can.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-14 Thread Nick Piggin

Hugh Dickins wrote:

On Wed, 14 Feb 2007, Nick Piggin wrote:


Can't you have migration without swap?



Yes: but then the only swap entry it can find (short of page
table corruption, which isn't really the focus of mincore)
is a migration entry, isn't it?


Just doesn't seem logical to have CONFIG_SWAP ifdef cover the
whole thing, regardless that it produces the desired result.

I'm going to submit a fixup patch to Linus covering all this
stuff, after making a more comprehensive test case (yes I
actually did test this patch with a few different cases before
submitting it, so I must have been unlucky with uninitialised
data).

If he wants to apply it rather than back out the patch entirely,
its up to him.

I don't think there is any reason to panic. I did completely
forget the result vector, but AFAIKS that's the only real bug
in it.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-14 Thread Nick Piggin

Hugh Dickins wrote:

On Wed, 14 Feb 2007, Nick Piggin wrote:


Can't you have migration without swap?



Yes: but then the only swap entry it can find (short of page
table corruption, which isn't really the focus of mincore)
is a migration entry, isn't it?


Just doesn't seem logical to have CONFIG_SWAP ifdef cover the
whole thing, regardless that it produces the desired result.

I'm going to submit a fixup patch to Linus covering all this
stuff, after making a more comprehensive test case (yes I
actually did test this patch with a few different cases before
submitting it, so I must have been unlucky with uninitialised
data).

If he wants to apply it rather than back out the patch entirely,
its up to him.

I don't think there is any reason to panic. I did completely
forget the result vector, but AFAIKS that's the only real bug
in it.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-14 Thread Christoph Lameter
On Wed, 14 Feb 2007, Nick Piggin wrote:

 Can't you have migration without swap?

Yes you can.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Wed, 14 Feb 2007, Nick Piggin wrote:
> 
> Can't you have migration without swap?

Yes: but then the only swap entry it can find (short of page
table corruption, which isn't really the focus of mincore)
is a migration entry, isn't it?

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Nick Piggin

Hugh Dickins wrote:

On Tue, 13 Feb 2007, Randy Dunlap wrote:


From: Randy Dunlap <[EMAIL PROTECTED]>

Don't check for pte swap entries when CONFIG_SWAP=n.
And save 'present' in the vec array.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>



What you've done there is fine, Randy, thank you.


Can't you have migration without swap?


But I just got out of bed to take another look, and indeed:
what is it doing in the none_mapped !vma->vm_file case?
passing back an uninitialized vector.


I must have completely forgotten about the vector :(

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote:
> From: Randy Dunlap <[EMAIL PROTECTED]>
> 
> Don't check for pte swap entries when CONFIG_SWAP=n.
> And save 'present' in the vec array.
> 
> mm/built-in.o: In function `sys_mincore':
> (.text+0xe584): undefined reference to `swapper_space'
> 
> Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>

What you've done there is fine, Randy, thank you.

But I just got out of bed to take another look, and indeed:
what is it doing in the none_mapped !vma->vm_file case?
passing back an uninitialized vector.

Easy enough to fix, but I'd say Nick's patch has by now exceeded
its embarrassment quota, and should be reverted from Linus' tree
for now: clearly none of us have been paying enough attention,
and other eyes are liable to find further errors lurking in it.

Hugh

> ---
>  mm/mincore.c |5 +
>  1 file changed, 5 insertions(+)
> 
> --- linux-2.6.20-git9.orig/mm/mincore.c
> +++ linux-2.6.20-git9/mm/mincore.c
> @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
>   present = mincore_page(vma->vm_file->f_mapping, pgoff);
>  
>   } else { /* pte is a swap entry */
> +#ifdef CONFIG_SWAP
>   swp_entry_t entry = pte_to_swp_entry(pte);
>   if (is_migration_entry(entry)) {
>   /* migration entries are always uptodate */
> @@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
>   pgoff = entry.val;
>   present = mincore_page(_space, pgoff);
>   }
> +#else
> + present = 1;
> +#endif
>   }
> + vec[i] = present;
>   }
>   pte_unmap_unlock(ptep-1, ptl);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Randy Dunlap

> > > > oops.  CONFIG_SWAP=n,  I assume?
> 
> Sorry for being so slow to respond on this.  Yes, I'm inclined to
> your ifdeffery fix - one can go cleverer, but I'd say it's the
> appropriate fix now.
> 
> But, please change your "present = 0;" to "present = 1;" -
> if CONFIG_SWAP isn't on, it has to be a migration entry,
> which always counts as present.
> 
> > 
> > BUT:  what is  used for in that loop?  or is it used?
> 
> Well spotted!  Something has gone missing: there needs to be a
>   vec[i] = present;
> at the bottom of that loop.


From: Randy Dunlap <[EMAIL PROTECTED]>

Don't check for pte swap entries when CONFIG_SWAP=n.
And save 'present' in the vec array.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 mm/mincore.c |5 +
 1 file changed, 5 insertions(+)

--- linux-2.6.20-git9.orig/mm/mincore.c
+++ linux-2.6.20-git9/mm/mincore.c
@@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
present = mincore_page(vma->vm_file->f_mapping, pgoff);
 
} else { /* pte is a swap entry */
+#ifdef CONFIG_SWAP
swp_entry_t entry = pte_to_swp_entry(pte);
if (is_migration_entry(entry)) {
/* migration entries are always uptodate */
@@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
pgoff = entry.val;
present = mincore_page(_space, pgoff);
}
+#else
+   present = 1;
+#endif
}
+   vec[i] = present;
}
pte_unmap_unlock(ptep-1, ptl);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote:
> On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote:
> > Andrew Morton wrote:
> > >>On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote:
> > >>2.6.20-git8 on x86_64:
> > >>
> > >>
> > >>  LD  init/built-in.o
> > >>  LD  .tmp_vmlinux1
> > >>mm/built-in.o: In function `sys_mincore':
> > >>(.text+0xe584): undefined reference to `swapper_space'
> > >>make: *** [.tmp_vmlinux1] Error 1
> > > 
> > > 
> > > oops.  CONFIG_SWAP=n,  I assume?
> > > 
> > 
> > Hmm, OK. Hugh can strip me of my bonus point now...

No, Nick, you get to keep your bonus point, it was for remembering
migration pages.  I was the devil who tempted you into using
find_get_page(_space,).

> > 
> > Hugh, you can strip me of my bonus point now... How about your other
> > suggestion to just remove the stats from lookup_swap_cache? (and should
> > we also rename it to find_get_swap_page?)

Not at this point.  I won't mind you putting up a patch doing that for
discussion and inclusion in -mm (if you do, then read_swap_cache_async
should use it too), but it's not now an appropriate fix to the
CONFIG_SWAP=n build issue.

> 
> I need a fix for this.  It's killing my daily/automated builds.
> So here is an ifdeffery-fix.

Sorry for being so slow to respond on this.  Yes, I'm inclined to
your ifdeffery fix - one can go cleverer, but I'd say it's the
appropriate fix now.

But, please change your "present = 0;" to "present = 1;" -
if CONFIG_SWAP isn't on, it has to be a migration entry,
which always counts as present.

> 
> BUT:  what is  used for in that loop?  or is it used?

Well spotted!  Something has gone missing: there needs to be a
vec[i] = present;
at the bottom of that loop.

Hugh

> 
> ---
> From: Randy Dunlap <[EMAIL PROTECTED]>
> 
> Don't check for pte swap entries when CONFIG_SWAP=n.
> 
> mm/built-in.o: In function `sys_mincore':
> (.text+0xe584): undefined reference to `swapper_space'
> 
> Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
> ---
>  mm/mincore.c |4 
>  1 file changed, 4 insertions(+)
> 
> --- linux-2.6.20-git8.orig/mm/mincore.c
> +++ linux-2.6.20-git8/mm/mincore.c
> @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
>   present = mincore_page(vma->vm_file->f_mapping, pgoff);
>  
>   } else { /* pte is a swap entry */
> +#ifdef CONFIG_SWAP
>   swp_entry_t entry = pte_to_swp_entry(pte);
>   if (is_migration_entry(entry)) {
>   /* migration entries are always uptodate */
> @@ -119,6 +120,9 @@ static long do_mincore(unsigned long add
>   pgoff = entry.val;
>   present = mincore_page(_space, pgoff);
>   }
> +#else
> + present = 0;
> +#endif
>   }
>   }
>   pte_unmap_unlock(ptep-1, ptl);
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Randy Dunlap
On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote:

> Andrew Morton wrote:
> >>On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote:
> >>2.6.20-git8 on x86_64:
> >>
> >>
> >>  LD  init/built-in.o
> >>  LD  .tmp_vmlinux1
> >>mm/built-in.o: In function `sys_mincore':
> >>(.text+0xe584): undefined reference to `swapper_space'
> >>make: *** [.tmp_vmlinux1] Error 1
> > 
> > 
> > oops.  CONFIG_SWAP=n,  I assume?
> > 
> 
> Hmm, OK. Hugh can strip me of my bonus point now...
> 
> Hugh, you can strip me of my bonus point now... How about your other
> suggestion to just remove the stats from lookup_swap_cache? (and should
> we also rename it to find_get_swap_page?)

I need a fix for this.  It's killing my daily/automated builds.
So here is an ifdeffery-fix.

BUT:  what is  used for in that loop?  or is it used?

---
From: Randy Dunlap <[EMAIL PROTECTED]>

Don't check for pte swap entries when CONFIG_SWAP=n.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 mm/mincore.c |4 
 1 file changed, 4 insertions(+)

--- linux-2.6.20-git8.orig/mm/mincore.c
+++ linux-2.6.20-git8/mm/mincore.c
@@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
present = mincore_page(vma->vm_file->f_mapping, pgoff);
 
} else { /* pte is a swap entry */
+#ifdef CONFIG_SWAP
swp_entry_t entry = pte_to_swp_entry(pte);
if (is_migration_entry(entry)) {
/* migration entries are always uptodate */
@@ -119,6 +120,9 @@ static long do_mincore(unsigned long add
pgoff = entry.val;
present = mincore_page(_space, pgoff);
}
+#else
+   present = 0;
+#endif
}
}
pte_unmap_unlock(ptep-1, ptl);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Randy Dunlap
On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote:

 Andrew Morton wrote:
 On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap [EMAIL PROTECTED] wrote:
 2.6.20-git8 on x86_64:
 
 
   LD  init/built-in.o
   LD  .tmp_vmlinux1
 mm/built-in.o: In function `sys_mincore':
 (.text+0xe584): undefined reference to `swapper_space'
 make: *** [.tmp_vmlinux1] Error 1
  
  
  oops.  CONFIG_SWAP=n,  I assume?
  
 
 Hmm, OK. Hugh can strip me of my bonus point now...
 
 Hugh, you can strip me of my bonus point now... How about your other
 suggestion to just remove the stats from lookup_swap_cache? (and should
 we also rename it to find_get_swap_page?)

I need a fix for this.  It's killing my daily/automated builds.
So here is an ifdeffery-fix.

BUT:  what is present used for in that loop?  or is it used?

---
From: Randy Dunlap [EMAIL PROTECTED]

Don't check for pte swap entries when CONFIG_SWAP=n.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 mm/mincore.c |4 
 1 file changed, 4 insertions(+)

--- linux-2.6.20-git8.orig/mm/mincore.c
+++ linux-2.6.20-git8/mm/mincore.c
@@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
present = mincore_page(vma-vm_file-f_mapping, pgoff);
 
} else { /* pte is a swap entry */
+#ifdef CONFIG_SWAP
swp_entry_t entry = pte_to_swp_entry(pte);
if (is_migration_entry(entry)) {
/* migration entries are always uptodate */
@@ -119,6 +120,9 @@ static long do_mincore(unsigned long add
pgoff = entry.val;
present = mincore_page(swapper_space, pgoff);
}
+#else
+   present = 0;
+#endif
}
}
pte_unmap_unlock(ptep-1, ptl);
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote:
 On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote:
  Andrew Morton wrote:
  On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap [EMAIL PROTECTED] wrote:
  2.6.20-git8 on x86_64:
  
  
LD  init/built-in.o
LD  .tmp_vmlinux1
  mm/built-in.o: In function `sys_mincore':
  (.text+0xe584): undefined reference to `swapper_space'
  make: *** [.tmp_vmlinux1] Error 1
   
   
   oops.  CONFIG_SWAP=n,  I assume?
   
  
  Hmm, OK. Hugh can strip me of my bonus point now...

No, Nick, you get to keep your bonus point, it was for remembering
migration pages.  I was the devil who tempted you into using
find_get_page(swapper_space,).

  
  Hugh, you can strip me of my bonus point now... How about your other
  suggestion to just remove the stats from lookup_swap_cache? (and should
  we also rename it to find_get_swap_page?)

Not at this point.  I won't mind you putting up a patch doing that for
discussion and inclusion in -mm (if you do, then read_swap_cache_async
should use it too), but it's not now an appropriate fix to the
CONFIG_SWAP=n build issue.

 
 I need a fix for this.  It's killing my daily/automated builds.
 So here is an ifdeffery-fix.

Sorry for being so slow to respond on this.  Yes, I'm inclined to
your ifdeffery fix - one can go cleverer, but I'd say it's the
appropriate fix now.

But, please change your present = 0; to present = 1; -
if CONFIG_SWAP isn't on, it has to be a migration entry,
which always counts as present.

 
 BUT:  what is present used for in that loop?  or is it used?

Well spotted!  Something has gone missing: there needs to be a
vec[i] = present;
at the bottom of that loop.

Hugh

 
 ---
 From: Randy Dunlap [EMAIL PROTECTED]
 
 Don't check for pte swap entries when CONFIG_SWAP=n.
 
 mm/built-in.o: In function `sys_mincore':
 (.text+0xe584): undefined reference to `swapper_space'
 
 Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
 ---
  mm/mincore.c |4 
  1 file changed, 4 insertions(+)
 
 --- linux-2.6.20-git8.orig/mm/mincore.c
 +++ linux-2.6.20-git8/mm/mincore.c
 @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
   present = mincore_page(vma-vm_file-f_mapping, pgoff);
  
   } else { /* pte is a swap entry */
 +#ifdef CONFIG_SWAP
   swp_entry_t entry = pte_to_swp_entry(pte);
   if (is_migration_entry(entry)) {
   /* migration entries are always uptodate */
 @@ -119,6 +120,9 @@ static long do_mincore(unsigned long add
   pgoff = entry.val;
   present = mincore_page(swapper_space, pgoff);
   }
 +#else
 + present = 0;
 +#endif
   }
   }
   pte_unmap_unlock(ptep-1, ptl);
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Randy Dunlap

oops.  CONFIG_SWAP=n,  I assume?
 
 Sorry for being so slow to respond on this.  Yes, I'm inclined to
 your ifdeffery fix - one can go cleverer, but I'd say it's the
 appropriate fix now.
 
 But, please change your present = 0; to present = 1; -
 if CONFIG_SWAP isn't on, it has to be a migration entry,
 which always counts as present.
 
  
  BUT:  what is present used for in that loop?  or is it used?
 
 Well spotted!  Something has gone missing: there needs to be a
   vec[i] = present;
 at the bottom of that loop.


From: Randy Dunlap [EMAIL PROTECTED]

Don't check for pte swap entries when CONFIG_SWAP=n.
And save 'present' in the vec array.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 mm/mincore.c |5 +
 1 file changed, 5 insertions(+)

--- linux-2.6.20-git9.orig/mm/mincore.c
+++ linux-2.6.20-git9/mm/mincore.c
@@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
present = mincore_page(vma-vm_file-f_mapping, pgoff);
 
} else { /* pte is a swap entry */
+#ifdef CONFIG_SWAP
swp_entry_t entry = pte_to_swp_entry(pte);
if (is_migration_entry(entry)) {
/* migration entries are always uptodate */
@@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
pgoff = entry.val;
present = mincore_page(swapper_space, pgoff);
}
+#else
+   present = 1;
+#endif
}
+   vec[i] = present;
}
pte_unmap_unlock(ptep-1, ptl);
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Tue, 13 Feb 2007, Randy Dunlap wrote:
 From: Randy Dunlap [EMAIL PROTECTED]
 
 Don't check for pte swap entries when CONFIG_SWAP=n.
 And save 'present' in the vec array.
 
 mm/built-in.o: In function `sys_mincore':
 (.text+0xe584): undefined reference to `swapper_space'
 
 Signed-off-by: Randy Dunlap [EMAIL PROTECTED]

What you've done there is fine, Randy, thank you.

But I just got out of bed to take another look, and indeed:
what is it doing in the none_mapped !vma-vm_file case?
passing back an uninitialized vector.

Easy enough to fix, but I'd say Nick's patch has by now exceeded
its embarrassment quota, and should be reverted from Linus' tree
for now: clearly none of us have been paying enough attention,
and other eyes are liable to find further errors lurking in it.

Hugh

 ---
  mm/mincore.c |5 +
  1 file changed, 5 insertions(+)
 
 --- linux-2.6.20-git9.orig/mm/mincore.c
 +++ linux-2.6.20-git9/mm/mincore.c
 @@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
   present = mincore_page(vma-vm_file-f_mapping, pgoff);
  
   } else { /* pte is a swap entry */
 +#ifdef CONFIG_SWAP
   swp_entry_t entry = pte_to_swp_entry(pte);
   if (is_migration_entry(entry)) {
   /* migration entries are always uptodate */
 @@ -119,7 +120,11 @@ static long do_mincore(unsigned long add
   pgoff = entry.val;
   present = mincore_page(swapper_space, pgoff);
   }
 +#else
 + present = 1;
 +#endif
   }
 + vec[i] = present;
   }
   pte_unmap_unlock(ptep-1, ptl);
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Nick Piggin

Hugh Dickins wrote:

On Tue, 13 Feb 2007, Randy Dunlap wrote:


From: Randy Dunlap [EMAIL PROTECTED]

Don't check for pte swap entries when CONFIG_SWAP=n.
And save 'present' in the vec array.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]



What you've done there is fine, Randy, thank you.


Can't you have migration without swap?


But I just got out of bed to take another look, and indeed:
what is it doing in the none_mapped !vma-vm_file case?
passing back an uninitialized vector.


I must have completely forgotten about the vector :(

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] build error: allnoconfig fails on mincore/swapper_space

2007-02-13 Thread Hugh Dickins
On Wed, 14 Feb 2007, Nick Piggin wrote:
 
 Can't you have migration without swap?

Yes: but then the only swap entry it can find (short of page
table corruption, which isn't really the focus of mincore)
is a migration entry, isn't it?

Hugh
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/