From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 1/13] misc fixes
Date: Sun, 28 Jul 2002 00:32:25 -0700 [thread overview]
Message-ID: <3D439E09.3348E8D6@zip.com.au> (raw)
There are a few VM-related patches in this series. Mainly fixes;
feature work is on hold.
We have some fairly serious locking contention problems with the reverse
mapping's pte_chains. Until we have a clear way out of that I believe
that it is best to not merge code which has a lot of rmap dependency.
It is apparent that these problems will not be solved by tweaking -
some redesign is needed. In the 2.5 timeframe the only practical
solution appears to be page table sharing, based on Daniel's February
work. Daniel and Dave McCracken are working that.
Some bits and pieces here:
- list_splice() has an open-coded list_empty() in it. Use
list_empty() instead.
- in shrink_cache() we have a local `nr_pages' which shadows another
local. Rename the inner one. (Nikita Danilov)
- Add a BUG() on a can't-happen code path in page_remove_rmap().
- Tighten up the bug checks in the BH completion handlers - if the
buffer is still under IO then it must be locked, because we unlock it
inside the page_uptodate_lock.
fs/buffer.c | 10 ++++------
include/linux/list.h | 4 +---
mm/rmap.c | 2 ++
mm/vmscan.c | 6 +++---
4 files changed, 10 insertions(+), 12 deletions(-)
--- 2.5.29/include/linux/list.h~misc Sat Jul 27 23:38:12 2002
+++ 2.5.29-akpm/include/linux/list.h Sat Jul 27 23:38:12 2002
@@ -156,9 +156,7 @@ static inline void __list_splice(list_t
*/
static inline void list_splice(list_t *list, list_t *head)
{
- list_t *first = list->next;
-
- if (first != list)
+ if (!list_empty(list))
__list_splice(list, head);
}
--- 2.5.29/mm/vmscan.c~misc Sat Jul 27 23:38:12 2002
+++ 2.5.29-akpm/mm/vmscan.c Sat Jul 27 23:49:01 2002
@@ -200,8 +200,8 @@ shrink_cache(int nr_pages, zone_t *class
* so the direct writes to the page cannot get lost.
*/
int (*writeback)(struct page *, int *);
- const int nr_pages = SWAP_CLUSTER_MAX;
- int nr_to_write = nr_pages;
+ const int cluster_size = SWAP_CLUSTER_MAX;
+ int nr_to_write = cluster_size;
writeback = mapping->a_ops->vm_writeback;
if (writeback == NULL)
@@ -209,7 +209,7 @@ shrink_cache(int nr_pages, zone_t *class
page_cache_get(page);
spin_unlock(&pagemap_lru_lock);
(*writeback)(page, &nr_to_write);
- max_scan -= (nr_pages - nr_to_write);
+ max_scan -= (cluster_size - nr_to_write);
page_cache_release(page);
spin_lock(&pagemap_lru_lock);
continue;
--- 2.5.29/mm/rmap.c~misc Sat Jul 27 23:38:12 2002
+++ 2.5.29-akpm/mm/rmap.c Sat Jul 27 23:49:03 2002
@@ -205,6 +205,8 @@ void page_remove_rmap(struct page * page
}
printk("\n");
printk(KERN_ERR "page_remove_rmap: driver cleared PG_reserved ?\n");
+#else
+ BUG();
#endif
out:
--- 2.5.29/fs/buffer.c~misc Sat Jul 27 23:38:16 2002
+++ 2.5.29-akpm/fs/buffer.c Sat Jul 27 23:38:25 2002
@@ -514,9 +514,8 @@ static void end_buffer_async_read(struct
if (!buffer_uptodate(tmp))
page_uptodate = 0;
if (buffer_async_read(tmp)) {
- if (buffer_locked(tmp))
- goto still_busy;
- BUG();
+ BUG_ON(!buffer_locked(tmp));
+ goto still_busy;
}
tmp = tmp->b_this_page;
} while (tmp != bh);
@@ -564,9 +563,8 @@ static void end_buffer_async_write(struc
tmp = bh->b_this_page;
while (tmp != bh) {
if (buffer_async_write(tmp)) {
- if (buffer_locked(tmp))
- goto still_busy;
- BUG();
+ BUG_ON(!buffer_locked(tmp));
+ goto still_busy;
}
tmp = tmp->b_this_page;
}
.
next reply other threads:[~2002-07-28 7:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-28 7:32 Andrew Morton [this message]
2002-07-29 7:26 ` [patch 1/13] misc fixes Daniel Phillips
2002-07-29 8:44 ` Rik van Riel
2002-07-29 8:40 ` David S. Miller
2002-07-29 20:00 ` Andrew Morton
2002-07-29 20:55 ` Rik van Riel
2002-07-29 22:36 ` Daniel Phillips
2002-07-29 21:51 ` Daniel Phillips
2002-07-31 22:22 ` Rmap setup/teardown suckage Daniel Phillips
2002-07-30 10:11 ` [patch 1/13] misc fixes Daniel Phillips
2002-07-30 10:18 ` Daniel Phillips
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=3D439E09.3348E8D6@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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