Re: 2.2.12 Memory Leak?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 1 Sep 1999 20:41:39 +0100 (BST)


> > I wouldn't kill, but perhaps maim a few individuals for a good stable
> > linux kernel on Sparc SMP...
>
> I have a fresh 2.2.12 kernel sitting here waiting to go. I'm on an Intel
> machine... is this bug evident with that architecture?

Apparently not. Although I don't understand why having seen the bug and
added the fix to 2.2.13pre3.

diff -u --new-file --recursive --exclude-from ../exclude linux.vanilla/include/linux/fs.h linux.13p3/include/linux/fs.h
--- linux.vanilla/include/linux/fs.h Sat Aug 28 20:00:59 1999
+++ linux.13p3/include/linux/fs.h Wed Sep 1 13:58:58 1999
@@ -184,7 +184,6 @@
#define BH_Lock 2 /* 1 if the buffer is locked */
#define BH_Req 3 /* 0 if the buffer has been invalidated */
#define BH_Protected 6 /* 1 if the buffer is protected */
-#define BH_LowPrio 7 /* 1 if the buffer is lowprio */

/*
* Try to keep the most commonly used fields in single cache lines (16
@@ -755,7 +754,6 @@
extern void refile_buffer(struct buffer_head * buf);
extern void set_writetime(struct buffer_head * buf, int flag);
extern int try_to_free_buffers(struct page *);
-extern void cache_drop_behind(struct buffer_head *bh);

extern int nr_buffers;
extern int buffermem;
@@ -776,25 +774,6 @@
}
}

-extern inline void mark_buffer_highprio(struct buffer_head * bh)
-{
- clear_bit(BH_LowPrio, &bh->b_state);
-}
-
-extern inline void mark_buffer_lowprio(struct buffer_head * bh)
-{
- /*
- * dirty buffers cannot be marked lowprio.
- */
- if (!buffer_dirty(bh))
- set_bit(BH_LowPrio, &bh->b_state);
-}
-
-static inline int buffer_lowprio(struct buffer_head * bh)
-{
- return test_bit(BH_LowPrio, &bh->b_state);
-}
-
extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag)
{
if (!test_and_set_bit(BH_Dirty, &bh->b_state)) {
@@ -802,23 +781,6 @@
if (bh->b_list != BUF_DIRTY)
refile_buffer(bh);
}
- /*
- * if a buffer gets marked dirty then it has to lose
- * it's lowprio state.
- */
- mark_buffer_highprio(bh);
-}
-
-extern inline void mark_buffer_dirty_lowprio(struct buffer_head * bh)
-{
- if (!test_and_set_bit(BH_Dirty, &bh->b_state)) {
- if (bh->b_list != BUF_DIRTY)
- refile_buffer(bh);
- /*
- * Mark it lowprio only if it was not dirty before!
- */
- set_bit(BH_LowPrio, &bh->b_state);
- }
}

extern int check_disk_change(kdev_t dev);
@@ -889,7 +851,6 @@
extern struct buffer_head * find_buffer(kdev_t dev, int block, int size);
extern void ll_rw_block(int, int, struct buffer_head * bh[]);
extern int is_read_only(kdev_t);
-extern int is_device_idle(kdev_t);
extern void __brelse(struct buffer_head *);
extern inline void brelse(struct buffer_head *buf)
{
@@ -905,12 +866,8 @@
extern void set_blocksize(kdev_t dev, int size);
extern unsigned int get_hardblocksize(kdev_t dev);
extern struct buffer_head * bread(kdev_t dev, int block, int size);
-extern struct buffer_head * buffer_ready (kdev_t dev, int block, int size);
-extern void bread_ahead (kdev_t dev, int block, int size);
extern struct buffer_head * breada(kdev_t dev,int block, int size,
unsigned int pos, unsigned int filesize);
-extern struct buffer_head * breada_blocks(kdev_t dev,int block,
- int size, int blocks);

extern int brw_page(int, struct page *, kdev_t, int [], int, int);

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