From: Randy Dunlap <randy.dunlap@oracle.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
tony.luck@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] build error: allnoconfig fails on mincore/swapper_space
Date: Tue, 13 Feb 2007 14:49:09 -0800 [thread overview]
Message-ID: <20070213144909.70943de2.randy.dunlap@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702132224280.3729@blonde.wat.veritas.com>
> > > > 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 <randy.dunlap@oracle.com>
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 <randy.dunlap@oracle.com>
---
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-02-13 22:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 22:50 Randy Dunlap
2007-02-12 23:08 ` Andrew Morton
2007-02-12 23:06 ` Randy Dunlap
2007-02-13 0:26 ` Tony Luck
2007-02-13 2:48 ` Nick Piggin
2007-02-13 20:12 ` [patch] " Randy Dunlap
2007-02-13 22:40 ` Hugh Dickins
2007-02-13 22:49 ` Randy Dunlap [this message]
2007-02-14 0:19 ` Hugh Dickins
2007-02-14 1:33 ` Nick Piggin
2007-02-14 7:31 ` Hugh Dickins
2007-02-14 9:10 ` Nick Piggin
2007-02-14 19:02 ` Christoph Lameter
2007-02-15 16:55 ` Randy Dunlap
2007-02-15 17:58 ` Linus Torvalds
2007-02-15 18:16 ` Jeff Garzik
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=20070213144909.70943de2.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=tony.luck@gmail.com \
/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