From: Benjamin LaHaise <bcrl@redhat.com>
To: Ed Tomlinson <tomlins@cam.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] in 2.4.17 after 10 days uptime
Date: Tue, 1 Jan 2002 14:56:05 -0500 [thread overview]
Message-ID: <20020101145605.B3283@redhat.com> (raw)
In-Reply-To: <20020101071802.6E8533F2B6@oscar.casa.dyndns.org>
In-Reply-To: <20020101071802.6E8533F2B6@oscar.casa.dyndns.org>; from tomlins@cam.org on Tue, Jan 01, 2002 at 02:18:01AM -0500
On Tue, Jan 01, 2002 at 02:18:01AM -0500, Ed Tomlinson wrote:
> I started getting these bugs after about 10 days uptime. There is a patch
> set for reiserfs applied along with a few minor patches (ide-tape, disk
> stats for up to hdg). The kernel is tainted by:
Expected BUG. Here's the fix. Marcelo, this is what we discussed previously:
parts of the kernel that grab a temporary reference to a page will frequently
not use page_cache_release as the page may never have been part of the page
cache. This shows up with the network stack in sendpage() as well as many
other paths. Please apply.
:r ~/patches/v2.4.17-pglru.diff
diff -urN v2.4.17/include/linux/pagemap.h v2.4.17-pglru/include/linux/pagemap.h
--- v2.4.17/include/linux/pagemap.h Thu Dec 20 19:30:25 2001
+++ v2.4.17-pglru/include/linux/pagemap.h Tue Jan 1 14:46:04 2002
@@ -29,7 +29,7 @@
#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
#define page_cache_get(x) get_page(x)
-extern void FASTCALL(page_cache_release(struct page *));
+#define page_cache_release(x) __free_page(x)
static inline struct page *page_cache_alloc(struct address_space *x)
{
diff -urN v2.4.17/kernel/ksyms.c v2.4.17-pglru/kernel/ksyms.c
--- v2.4.17/kernel/ksyms.c Tue Jan 1 14:09:35 2002
+++ v2.4.17-pglru/kernel/ksyms.c Tue Jan 1 14:46:55 2002
@@ -95,7 +95,6 @@
EXPORT_SYMBOL(alloc_pages_node);
EXPORT_SYMBOL(__get_free_pages);
EXPORT_SYMBOL(get_zeroed_page);
-EXPORT_SYMBOL(page_cache_release);
EXPORT_SYMBOL(__free_pages);
EXPORT_SYMBOL(free_pages);
EXPORT_SYMBOL(num_physpages);
diff -urN v2.4.17/mm/page_alloc.c v2.4.17-pglru/mm/page_alloc.c
--- v2.4.17/mm/page_alloc.c Mon Nov 26 23:43:08 2001
+++ v2.4.17-pglru/mm/page_alloc.c Tue Jan 1 14:44:59 2002
@@ -70,6 +70,12 @@
struct page *base;
zone_t *zone;
+ /* Yes, think what happens when other parts of the kernel take
+ * a reference to a page in order to pin it for io. -ben
+ */
+ if (PageLRU(page))
+ lru_cache_del(page);
+
if (page->buffers)
BUG();
if (page->mapping)
@@ -426,15 +432,6 @@
return 0;
}
-void page_cache_release(struct page *page)
-{
- if (!PageReserved(page) && put_page_testzero(page)) {
- if (PageLRU(page))
- lru_cache_del(page);
- __free_pages_ok(page, 0);
- }
-}
-
void __free_pages(struct page *page, unsigned int order)
{
if (!PageReserved(page) && put_page_testzero(page))
next prev parent reply other threads:[~2002-01-01 19:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-01 7:18 [BUG] in 2.4.17 after 10 days uptime Ed Tomlinson
2002-01-01 19:56 ` Benjamin LaHaise [this message]
2002-01-07 18:28 ` Marcelo Tosatti
2002-01-08 2:24 ` Benjamin LaHaise
2002-01-08 3:38 ` Ed Tomlinson
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=20020101145605.B3283@redhat.com \
--to=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=tomlins@cam.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox