Re: Linux 2.4.10-pre11

Andrea Arcangeli (andrea@suse.de)
Tue, 18 Sep 2001 04:02:40 +0200


On Tue, Sep 18, 2001 at 03:50:55AM +0200, Andrea Arcangeli wrote:
> On Mon, Sep 17, 2001 at 09:18:34PM -0400, Benjamin LaHaise wrote:
> > On Mon, Sep 17, 2001 at 05:08:37PM -0700, Linus Torvalds wrote:
> > >
> > > Ok, the big thing here is continued merging, this time with Andrea.
> > >
> > > I still don't like some of the VM changes, but integrating Andrea's VM
> > > changes results in (a) better performance and (b) much cleaner inactive
> > > page handling in particular. Besides, for the 2.4.x tree, the big priority
> > > is stability, we can re-address my other concerns during 2.5.x.
> >
> > What is the idea behind merging complete and total utter CRAP into the
> > tree? Lets take a few completely fubar'd hunks as examples. Let's start
> > with fs/buffer.c:
> >
> > Point 1. It doesn't compile with egcs 1.1.2. Pretty remarkable for the only
> > recommended stable compiler.
>
> Sorry, I use gcc 3.0.2, but I assume fixing the compilation trouble with
> egcs 1.1.2 is trivial. Can you show which is the interested line of
> code so we can rewrite it in a compatible manner?

ah I just got a (verbose) report about one compilation trouble with old
kernels, the 00_rwsem patch that includes this backwards compatibility
hunk wasn't applied. This is a very very minor issue. Please Linus
include this patch to fix the compilation troubles with the old
compilers:

diff -urN 2.4.10pre10/include/linux/compiler.h rwsem/include/linux/compiler.h
--- 2.4.10pre10/include/linux/compiler.h Thu Jan 1 01:00:00 1970
+++ rwsem/include/linux/compiler.h Tue Sep 18 02:02:08 2001
@@ -0,0 +1,13 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __LINUX_COMPILER_H */

Then you need to simply include <linux/compile.h> from the files that
doesn't compile, this second patch is untested but it should do the
trick (00_rwsem-?? was including compile.h from the rwsem includes that
were in turn included by those files implicitly so I didn't need to add
compile.h in each file):

--- 2.4.10pre11/mm/slab.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/slab.c Tue Sep 18 04:00:30 2001
@@ -72,6 +72,7 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/init.h>
+#include <linux/compile.h>
#include <asm/uaccess.h>

/*
--- 2.4.10pre11/mm/page_alloc.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/page_alloc.c Tue Sep 18 04:00:20 2001
@@ -17,6 +17,7 @@
#include <linux/pagemap.h>
#include <linux/bootmem.h>
#include <linux/slab.h>
+#include <linux/compile.h>

int nr_swap_pages;
int nr_active_pages;
--- 2.4.10pre11/mm/vmscan.c.~1~ Tue Sep 18 02:43:04 2001
+++ 2.4.10pre11/mm/vmscan.c Tue Sep 18 04:00:47 2001
@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/file.h>
+#include <linux/compile.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/