Re: [PATCH] remove all kernel bugs

2005-04-02 Thread Jan-Benedict Glaw
On Sat, 2005-04-02 23:03:14 +0200, Geert Uytterhoeven <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>:
> On Fri, 1 Apr 2005, Jan-Benedict Glaw wrote:
> > Well, the patch looks fine, but you forgot to also do the VAX-specific
> > part. Withoug the BUGs, maybe the VAX kernel would be even faster?
> 
> Perhaps it's a good idea to get Linux/VAX merged in mainline first? After that
> people will start fixing all your bugs automagically ;-)

Maybe we'll work on that, but first we need to get real, up-to-date
userspace and not all this old stuff with uClibc. But we're working on
this. (Currently tracking down an ICE. GCC is fun. A lot of fun and
black magic...)

MfG, JBG

-- 
Jan-Benedict Glaw   [EMAIL PROTECTED]. +49-172-7608481 _ O _
"Eine Freie Meinung in  einem Freien Kopf| Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier BÃrger" | im Internet! |   im Irak!   O O 
O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));


signature.asc
Description: Digital signature


Re: [PATCH] remove all kernel bugs

2005-04-02 Thread Geert Uytterhoeven
On Fri, 1 Apr 2005, Jan-Benedict Glaw wrote:
> On Fri, 2005-04-01 01:07:44 -0800, Matt Mackall <[EMAIL PROTECTED]>
> wrote in message <[EMAIL PROTECTED]>:
> > I've been sitting on this patch for a while, figured it's high time I
> > shared it with the world. This patch eliminates all kernel bugs, trims
> > about 35k off the typical kernel, and makes the system slightly
> > faster. The patch is against the latest bk snapshot, please apply.
> > 
> > Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>
> 
> Well, the patch looks fine, but you forgot to also do the VAX-specific
> part. Withoug the BUGs, maybe the VAX kernel would be even faster?

Perhaps it's a good idea to get Linux/VAX merged in mainline first? After that
people will start fixing all your bugs automagically ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-02 Thread Geert Uytterhoeven
On Fri, 1 Apr 2005, Jan-Benedict Glaw wrote:
 On Fri, 2005-04-01 01:07:44 -0800, Matt Mackall [EMAIL PROTECTED]
 wrote in message [EMAIL PROTECTED]:
  I've been sitting on this patch for a while, figured it's high time I
  shared it with the world. This patch eliminates all kernel bugs, trims
  about 35k off the typical kernel, and makes the system slightly
  faster. The patch is against the latest bk snapshot, please apply.
  
  Signed-off-by: Matt Mackall [EMAIL PROTECTED]
 
 Well, the patch looks fine, but you forgot to also do the VAX-specific
 part. Withoug the BUGs, maybe the VAX kernel would be even faster?

Perhaps it's a good idea to get Linux/VAX merged in mainline first? After that
people will start fixing all your bugs automagically ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say programmer or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-02 Thread Jan-Benedict Glaw
On Sat, 2005-04-02 23:03:14 +0200, Geert Uytterhoeven [EMAIL PROTECTED]
wrote in message [EMAIL PROTECTED]:
 On Fri, 1 Apr 2005, Jan-Benedict Glaw wrote:
  Well, the patch looks fine, but you forgot to also do the VAX-specific
  part. Withoug the BUGs, maybe the VAX kernel would be even faster?
 
 Perhaps it's a good idea to get Linux/VAX merged in mainline first? After that
 people will start fixing all your bugs automagically ;-)

Maybe we'll work on that, but first we need to get real, up-to-date
userspace and not all this old stuff with uClibc. But we're working on
this. (Currently tracking down an ICE. GCC is fun. A lot of fun and
black magic...)

MfG, JBG

-- 
Jan-Benedict Glaw   [EMAIL PROTECTED]. +49-172-7608481 _ O _
Eine Freie Meinung in  einem Freien Kopf| Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Brger | im Internet! |   im Irak!   O O 
O
ret = do_actions((curr | FREE_SPEECH)  ~(NEW_COPYRIGHT_LAW | DRM | TCPA));


signature.asc
Description: Digital signature


Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Matt Mackall
On Fri, Apr 01, 2005 at 01:34:54AM -0800, Andrew Morton wrote:
> Matt Mackall <[EMAIL PROTECTED]> wrote:
> >
> > I've been sitting on this patch for a while, figured it's high time I
> >  shared it with the world. This patch eliminates all kernel bugs, trims
> >  about 35k off the typical kernel, and makes the system slightly
> >  faster. The patch is against the latest bk snapshot, please apply.
> 
> ho-hum, more ifdefs.
> 
> How's about you nuke PAGE_BUG first?  Just replace it with BUG() everywhere.
> 
> Or do it as a later patch - doesn't matter much I guess.

With pleasure.

Exterminate PAGE_BUG.

Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>

Index: af/include/asm-sh64/bug.h
===
--- af.orig/include/asm-sh64/bug.h  2005-04-01 11:17:38.0 -0800
+++ af/include/asm-sh64/bug.h   2005-04-01 11:17:40.0 -0800
@@ -17,10 +17,6 @@
BUG(); \
 } while(0)
 
-#define PAGE_BUG(page) do { \
-   BUG(); \
-} while (0)
-
 #define WARN_ON(condition) do { \
if (unlikely((condition)!=0)) { \
printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, 
__LINE__); \
Index: af/fs/buffer.c
===
--- af.orig/fs/buffer.c 2005-04-01 11:17:38.0 -0800
+++ af/fs/buffer.c  2005-04-01 11:17:40.0 -0800
@@ -2078,8 +2078,7 @@ int block_read_full_page(struct page *pa
int nr, i;
int fully_mapped = 1;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
blocksize = 1 << inode->i_blkbits;
if (!page_has_buffers(page))
create_empty_buffers(page, blocksize, 0);
Index: af/fs/afs/file.c
===
--- af.orig/fs/afs/file.c   2005-04-01 11:17:38.0 -0800
+++ af/fs/afs/file.c2005-04-01 11:17:40.0 -0800
@@ -131,8 +131,7 @@ static int afs_file_readpage(struct file
 
vnode = AFS_FS_I(inode);
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
ret = -ESTALE;
if (vnode->flags & AFS_VNODE_DELETED)
Index: af/include/asm-generic/bug.h
===
--- af.orig/include/asm-generic/bug.h   2005-04-01 11:17:38.0 -0800
+++ af/include/asm-generic/bug.h2005-04-01 11:17:40.0 -0800
@@ -12,13 +12,6 @@
 } while (0)
 #endif
 
-#ifndef HAVE_ARCH_PAGE_BUG
-#define PAGE_BUG(page) do { \
-   printk("page BUG for page at %p\n", page); \
-   BUG(); \
-} while (0)
-#endif
-
 #ifndef HAVE_ARCH_BUG_ON
 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
 #endif
@@ -37,10 +30,6 @@
 #define BUG()
 #endif
 
-#ifndef HAVE_ARCH_PAGE_BUG
-#define PAGE_BUG(page) do { if (page) ; } while (0)
-#endif
-
 #ifndef HAVE_ARCH_BUG_ON
 #define BUG_ON(condition) do { if (condition) ; } while(0)
 #endif
Index: af/fs/jffs2/file.c
===
--- af.orig/fs/jffs2/file.c 2005-04-01 11:17:38.0 -0800
+++ af/fs/jffs2/file.c  2005-04-01 11:17:40.0 -0800
@@ -79,8 +79,7 @@ static int jffs2_do_readpage_nolock (str
 
D2(printk(KERN_DEBUG "jffs2_do_readpage_nolock(): ino #%lu, page at 
offset 0x%lx\n", inode->i_ino, pg->index << PAGE_CACHE_SHIFT));
 
-   if (!PageLocked(pg))
-PAGE_BUG(pg);
+   BUG_ON(!PageLocked(pg));
 
pg_buf = kmap(pg);
/* FIXME: Can kmap fail? */
Index: af/include/asm-cris/page.h
===
--- af.orig/include/asm-cris/page.h 2005-04-01 11:17:38.0 -0800
+++ af/include/asm-cris/page.h  2005-04-01 11:17:40.0 -0800
@@ -77,10 +77,6 @@ typedef struct { unsigned long pgprot; }
   printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
 } while (0)
 
-#define PAGE_BUG(page) do { \
- BUG(); \
-} while (0)
-
 /* Pure 2^n version of get_order */
 static inline int get_order(unsigned long size)
 {
Index: af/fs/udf/file.c
===
--- af.orig/fs/udf/file.c   2005-04-01 11:17:38.0 -0800
+++ af/fs/udf/file.c2005-04-01 11:17:40.0 -0800
@@ -49,8 +49,7 @@ static int udf_adinicb_readpage(struct f
struct inode *inode = page->mapping->host;
char *kaddr;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
kaddr = kmap(page);
memset(kaddr, 0, PAGE_CACHE_SIZE);
@@ -67,8 +66,7 @@ static int udf_adinicb_writepage(struct 
struct inode *inode = page->mapping->host;
char *kaddr;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
kaddr = kmap(page);
memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), kaddr, 

Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Andrew Morton
Matt Mackall <[EMAIL PROTECTED]> wrote:
>
> I've been sitting on this patch for a while, figured it's high time I
>  shared it with the world. This patch eliminates all kernel bugs, trims
>  about 35k off the typical kernel, and makes the system slightly
>  faster. The patch is against the latest bk snapshot, please apply.

ho-hum, more ifdefs.

How's about you nuke PAGE_BUG first?  Just replace it with BUG() everywhere.

Or do it as a later patch - doesn't matter much I guess.

Or tell me to naff off and don't do it at all ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Jan-Benedict Glaw
On Fri, 2005-04-01 01:07:44 -0800, Matt Mackall <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>:
> I've been sitting on this patch for a while, figured it's high time I
> shared it with the world. This patch eliminates all kernel bugs, trims
> about 35k off the typical kernel, and makes the system slightly
> faster. The patch is against the latest bk snapshot, please apply.
> 
> Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>

Well, the patch looks fine, but you forgot to also do the VAX-specific
part. Withoug the BUGs, maybe the VAX kernel would be even faster?

:-), JBG

-- 
Jan-Benedict Glaw   [EMAIL PROTECTED]. +49-172-7608481 _ O _
"Eine Freie Meinung in  einem Freien Kopf| Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier BÃrger" | im Internet! |   im Irak!   O O 
O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Jan-Benedict Glaw
On Fri, 2005-04-01 01:07:44 -0800, Matt Mackall [EMAIL PROTECTED]
wrote in message [EMAIL PROTECTED]:
 I've been sitting on this patch for a while, figured it's high time I
 shared it with the world. This patch eliminates all kernel bugs, trims
 about 35k off the typical kernel, and makes the system slightly
 faster. The patch is against the latest bk snapshot, please apply.
 
 Signed-off-by: Matt Mackall [EMAIL PROTECTED]

Well, the patch looks fine, but you forgot to also do the VAX-specific
part. Withoug the BUGs, maybe the VAX kernel would be even faster?

:-), JBG

-- 
Jan-Benedict Glaw   [EMAIL PROTECTED]. +49-172-7608481 _ O _
Eine Freie Meinung in  einem Freien Kopf| Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Brger | im Internet! |   im Irak!   O O 
O
ret = do_actions((curr | FREE_SPEECH)  ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Andrew Morton
Matt Mackall [EMAIL PROTECTED] wrote:

 I've been sitting on this patch for a while, figured it's high time I
  shared it with the world. This patch eliminates all kernel bugs, trims
  about 35k off the typical kernel, and makes the system slightly
  faster. The patch is against the latest bk snapshot, please apply.

ho-hum, more ifdefs.

How's about you nuke PAGE_BUG first?  Just replace it with BUG() everywhere.

Or do it as a later patch - doesn't matter much I guess.

Or tell me to naff off and don't do it at all ;)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] remove all kernel bugs

2005-04-01 Thread Matt Mackall
On Fri, Apr 01, 2005 at 01:34:54AM -0800, Andrew Morton wrote:
 Matt Mackall [EMAIL PROTECTED] wrote:
 
  I've been sitting on this patch for a while, figured it's high time I
   shared it with the world. This patch eliminates all kernel bugs, trims
   about 35k off the typical kernel, and makes the system slightly
   faster. The patch is against the latest bk snapshot, please apply.
 
 ho-hum, more ifdefs.
 
 How's about you nuke PAGE_BUG first?  Just replace it with BUG() everywhere.
 
 Or do it as a later patch - doesn't matter much I guess.

With pleasure.

Exterminate PAGE_BUG.

Signed-off-by: Matt Mackall [EMAIL PROTECTED]

Index: af/include/asm-sh64/bug.h
===
--- af.orig/include/asm-sh64/bug.h  2005-04-01 11:17:38.0 -0800
+++ af/include/asm-sh64/bug.h   2005-04-01 11:17:40.0 -0800
@@ -17,10 +17,6 @@
BUG(); \
 } while(0)
 
-#define PAGE_BUG(page) do { \
-   BUG(); \
-} while (0)
-
 #define WARN_ON(condition) do { \
if (unlikely((condition)!=0)) { \
printk(Badness in %s at %s:%d\n, __FUNCTION__, __FILE__, 
__LINE__); \
Index: af/fs/buffer.c
===
--- af.orig/fs/buffer.c 2005-04-01 11:17:38.0 -0800
+++ af/fs/buffer.c  2005-04-01 11:17:40.0 -0800
@@ -2078,8 +2078,7 @@ int block_read_full_page(struct page *pa
int nr, i;
int fully_mapped = 1;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
blocksize = 1  inode-i_blkbits;
if (!page_has_buffers(page))
create_empty_buffers(page, blocksize, 0);
Index: af/fs/afs/file.c
===
--- af.orig/fs/afs/file.c   2005-04-01 11:17:38.0 -0800
+++ af/fs/afs/file.c2005-04-01 11:17:40.0 -0800
@@ -131,8 +131,7 @@ static int afs_file_readpage(struct file
 
vnode = AFS_FS_I(inode);
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
ret = -ESTALE;
if (vnode-flags  AFS_VNODE_DELETED)
Index: af/include/asm-generic/bug.h
===
--- af.orig/include/asm-generic/bug.h   2005-04-01 11:17:38.0 -0800
+++ af/include/asm-generic/bug.h2005-04-01 11:17:40.0 -0800
@@ -12,13 +12,6 @@
 } while (0)
 #endif
 
-#ifndef HAVE_ARCH_PAGE_BUG
-#define PAGE_BUG(page) do { \
-   printk(page BUG for page at %p\n, page); \
-   BUG(); \
-} while (0)
-#endif
-
 #ifndef HAVE_ARCH_BUG_ON
 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
 #endif
@@ -37,10 +30,6 @@
 #define BUG()
 #endif
 
-#ifndef HAVE_ARCH_PAGE_BUG
-#define PAGE_BUG(page) do { if (page) ; } while (0)
-#endif
-
 #ifndef HAVE_ARCH_BUG_ON
 #define BUG_ON(condition) do { if (condition) ; } while(0)
 #endif
Index: af/fs/jffs2/file.c
===
--- af.orig/fs/jffs2/file.c 2005-04-01 11:17:38.0 -0800
+++ af/fs/jffs2/file.c  2005-04-01 11:17:40.0 -0800
@@ -79,8 +79,7 @@ static int jffs2_do_readpage_nolock (str
 
D2(printk(KERN_DEBUG jffs2_do_readpage_nolock(): ino #%lu, page at 
offset 0x%lx\n, inode-i_ino, pg-index  PAGE_CACHE_SHIFT));
 
-   if (!PageLocked(pg))
-PAGE_BUG(pg);
+   BUG_ON(!PageLocked(pg));
 
pg_buf = kmap(pg);
/* FIXME: Can kmap fail? */
Index: af/include/asm-cris/page.h
===
--- af.orig/include/asm-cris/page.h 2005-04-01 11:17:38.0 -0800
+++ af/include/asm-cris/page.h  2005-04-01 11:17:40.0 -0800
@@ -77,10 +77,6 @@ typedef struct { unsigned long pgprot; }
   printk(kernel BUG at %s:%d!\n, __FILE__, __LINE__); \
 } while (0)
 
-#define PAGE_BUG(page) do { \
- BUG(); \
-} while (0)
-
 /* Pure 2^n version of get_order */
 static inline int get_order(unsigned long size)
 {
Index: af/fs/udf/file.c
===
--- af.orig/fs/udf/file.c   2005-04-01 11:17:38.0 -0800
+++ af/fs/udf/file.c2005-04-01 11:17:40.0 -0800
@@ -49,8 +49,7 @@ static int udf_adinicb_readpage(struct f
struct inode *inode = page-mapping-host;
char *kaddr;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
kaddr = kmap(page);
memset(kaddr, 0, PAGE_CACHE_SIZE);
@@ -67,8 +66,7 @@ static int udf_adinicb_writepage(struct 
struct inode *inode = page-mapping-host;
char *kaddr;
 
-   if (!PageLocked(page))
-   PAGE_BUG(page);
+   BUG_ON(!PageLocked(page));
 
kaddr = kmap(page);
memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), kaddr, inode-i_size);
Index: af/fs/udf/inode.c