Re: highmem deadlock fix [was Re: VM in 2.4.10(+tweaks) vs. 2.4.9 -ac14/15(+stuff)]

From: Andrea Arcangeli (andrea@suse.de)
Date: Thu Sep 27 2001 - 17:39:24 EST


On Fri, Sep 28, 2001 at 12:37:46AM +0200, Andrea Arcangeli wrote:
> On Thu, Sep 27, 2001 at 05:34:17PM -0500, Robert_Macaulay@Dell.com wrote:
> >
> >
> > > -----Original Message-----
> > > From: Andrea Arcangeli [mailto:andrea@suse.de]
> > > Sent: Thursday, September 27, 2001 5:13 PM
> > > To: Macaulay, Robert
> > > Cc: Rik van Riel; Craig Kulesa; linux-kernel@vger.kernel.org; Bob
> > > Matthews; Marcelo Tosatti; Linus Torvalds
> > > Subject: highmem deadlock fix [was Re: VM in 2.4.10(+tweaks) vs.
> > > 2.4.9-ac14/15(+stuff)]
> > >
> > > @@ -2519,7 +2521,9 @@
> > > int tryagain = 1;
> > >
> > > do {
> > > - if (buffer_dirty(p) || buffer_locked(p)) {
> > > + if (unlikely(buffer_pending_IO(p)))
> > > + tryagain = 0;
> > > + else if (buffer_dirty(p) || buffer_locked(p)) {
> > > if (test_and_set_bit(BH_Wait_IO, &p->b_state)) {
> > > if (buffer_dirty(p)) {
> > > ll_rw_block(WRITE, 1, &p);
> > >
> >
> > Im getting an undefined reference to the unlikely function in this patch.
>
> ok, try adding #include <linux/compiler.h> to include/linux/kernel.h, I
> prefer to have likely/unlikely always available.

--- 2.4.10aa2/fs/inode.c.~1~ Wed Sep 26 18:45:27 2001
+++ 2.4.10aa2/fs/inode.c Fri Sep 28 00:38:39 2001
@@ -17,7 +17,6 @@
 #include <linux/swapctl.h>
 #include <linux/prefetch.h>
 #include <linux/locks.h>
-#include <linux/compiler.h>
 
 /*
  * New inode.c implementation.
--- 2.4.10aa2/include/linux/kernel.h.~1~ Wed Sep 26 18:51:24 2001
+++ 2.4.10aa2/include/linux/kernel.h Fri Sep 28 00:38:13 2001
@@ -11,6 +11,7 @@
 #include <linux/linkage.h>
 #include <linux/stddef.h>
 #include <linux/types.h>
+#include <linux/compiler.h>
 
 /* Optimization barrier */
 /* The "volatile" is due to gcc bugs */
--- 2.4.10aa2/mm/page_alloc.c.~1~ Wed Sep 26 18:45:28 2001
+++ 2.4.10aa2/mm/page_alloc.c Fri Sep 28 00:38:22 2001
@@ -17,7 +17,6 @@
 #include <linux/pagemap.h>
 #include <linux/bootmem.h>
 #include <linux/slab.h>
-#include <linux/compiler.h>
 #include <linux/vmalloc.h>
 
 int nr_swap_pages;
--- 2.4.10aa2/mm/slab.c.~1~ Wed Sep 26 18:45:29 2001
+++ 2.4.10aa2/mm/slab.c Fri Sep 28 00:38:24 2001
@@ -72,7 +72,6 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
-#include <linux/compiler.h>
 #include <asm/uaccess.h>
 
 /*
--- 2.4.10aa2/mm/swapfile.c.~1~ Sun Sep 23 21:11:43 2001
+++ 2.4.10aa2/mm/swapfile.c Fri Sep 28 00:38:26 2001
@@ -14,7 +14,6 @@
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
 #include <linux/shm.h>
-#include <linux/compiler.h>
 
 #include <asm/pgtable.h>
 
--- 2.4.10aa2/mm/vmscan.c.~1~ Wed Sep 26 18:45:28 2001
+++ 2.4.10aa2/mm/vmscan.c Fri Sep 28 00:38:29 2001
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/highmem.h>
 #include <linux/file.h>
-#include <linux/compiler.h>
 
 #include <asm/pgalloc.h>
 

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



This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:00:58 EST