2001-07-19 18:38:37

by Andrea Arcangeli

[permalink] [raw]
Subject: 2.4.7pre8aa1

Diff between 2.4.7pre6aa1 and 2.4.7pre8aa1 (besides moving on top
of 2.4.7pre8).

Only in 2.4.7pre8aa1/: 00_do_swap_page-fix-1

Account major faults for swapins. (from -ac)

Only in 2.4.7pre6aa1: 00_drop_async-io-get_bh-1
Only in 2.4.7pre8aa1/: 00_drop_async-io-get_bh-2

Rediffed for trivial reiserfs reject (reiserfs updates are included in
pre8).

Only in 2.4.7pre8aa1/: 00_ircomm-t39m-1

Fix for irda so that it works with my GPRS phone.

Only in 2.4.7pre6aa1: 00_lvm-0.9.1_beta7-4.bz2
Only in 2.4.7pre8aa1/: 00_lvm-0.9.1_beta7-5.bz2

Rediffed for trivial rejects about updates that
were just included into this patch.

Only in 2.4.7pre6aa1: 00_lvm-0.9.1_beta7-4_rwsem-fast-path-1
Only in 2.4.7pre8aa1/: 00_lvm-0.9.1_beta7-5_rwsem-fast-path-2

Rediffed so we solve snapshot hash lookups with the
read lock as well (low prio optimization). Also
#if 0 around the _pe_lock instead of any other fix,
since the pv_move with live writes going on the lv
is racy anyways in lvm beta7.

Only in 2.4.7pre6aa1: 00_rwsem-15
Only in 2.4.7pre8aa1/: 00_rwsem-16

Found a race in asm xchgadd algorithm, possibly mainline
could be affected too, will fix it and inspect mainline
ASAP.

Only in 2.4.7pre6aa1: 00_sched-yield-1

Merged in mainline.

Only in 2.4.7pre8aa1/: 00_via-quirks-1

VIA fixups from -ac.

Only in 2.4.7pre6aa1: 10_prefetch-1
Only in 2.4.7pre8aa1/: 10_prefetch-2

Rediffed for trivial rejects.

Only in 2.4.7pre6aa1/30_tux: 30_atomic-alloc-2
Only in 2.4.7pre8aa1/30_tux: 30_atomic-alloc-3

Rediffed for trivial rejects.

Only in 2.4.7pre8aa1/30_tux: 32_tux-uml-1

Moved the uml part of the -aa updates in the tux directory
since they are not needed when the tux patches are not applied.

Only in 2.4.7pre6aa1: 40_blkdev-pagecache-5
Only in 2.4.7pre8aa1/: 40_blkdev-pagecache-6

Default opens to O_LARGEFILE in blkdev_open so that mkreiserfs
doesn't need to be recompiled and we don't break
backwards compatibility (can be dropped in 2.5 if we want to).

Only in 2.4.7pre8aa1/: 41_blkdev-pagecache-5_drop_get_bh_async-1

When blkdev patch is applied in combination with the
00_drop_async-io-get_bh patch we must remeber to drop
the get_bh from the blkdev async_io too.

Only in 2.4.7pre6aa1: 51_uml-ac-to-aa-2.bz2
Only in 2.4.7pre8aa1/: 51_uml-ac-to-aa-3.bz2

Moved part of it in the tux directory so it can compile
without tux (in reality I got errno compilation error
but it's low prio and I'll sort it out later, Jeff Dike any
hint is welcome ;).

URL:

ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.7pre8aa1/
ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.7pre8aa1.bz2

Andrea


2001-07-19 23:45:49

by Jeff Dike

[permalink] [raw]
Subject: Re: 2.4.7pre8aa1

> Only in 2.4.7pre6aa1: 51_uml-ac-to-aa-2.bz2
> Only in 2.4.7pre8aa1/: 51_uml-ac-to-aa-3.bz2
> Moved part of it in the tux directory so it can compile
> without tux (in reality I got errno compilation error
> but it's low prio and I'll sort it out later, Jeff Dike any
> hint is welcome ;).

This is the patch I sent to Alan a while back which works around the problem.

rmk suggested a better way which I'll add at some point.

Jeff


diff -Naur -X exclude-files ac_cur/arch/um/Makefile ac/arch/um/Makefile
--- ac_cur/arch/um/Makefile Mon Jul 9 13:05:03 2001
+++ ac/arch/um/Makefile Mon Jul 9 13:26:21 2001
@@ -20,6 +20,8 @@
LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
endif

+CFLAGS := $(subst -fno-common,,$(CFLAGS))
+
SUBDIRS += $(ARCH_DIR)/fs $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
$(ARCH_DIR)/sys-$(SUBARCH)


2001-07-20 01:38:05

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.7pre8aa1

On Thu, Jul 19, 2001 at 06:45:38PM -0400, Jeff Dike wrote:
> > Only in 2.4.7pre6aa1: 51_uml-ac-to-aa-2.bz2
> > Only in 2.4.7pre8aa1/: 51_uml-ac-to-aa-3.bz2
> > Moved part of it in the tux directory so it can compile
> > without tux (in reality I got errno compilation error
> > but it's low prio and I'll sort it out later, Jeff Dike any
> > hint is welcome ;).
>
> This is the patch I sent to Alan a while back which works around the problem.
>
> rmk suggested a better way which I'll add at some point.
>
> Jeff
>
>
> diff -Naur -X exclude-files ac_cur/arch/um/Makefile ac/arch/um/Makefile
> --- ac_cur/arch/um/Makefile Mon Jul 9 13:05:03 2001
> +++ ac/arch/um/Makefile Mon Jul 9 13:26:21 2001
> @@ -20,6 +20,8 @@
> LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
> endif
>
> +CFLAGS := $(subst -fno-common,,$(CFLAGS))
> +
> SUBDIRS += $(ARCH_DIR)/fs $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
> $(ARCH_DIR)/sys-$(SUBARCH)

works fine thanks! Of course I agree with rmk it would be better not to
disable -fno-common but this is ok for now ;) (after all we would catch
any potential important name collision during the compiles of the other
targets)

Andrea

2001-07-20 01:42:25

by Jeff Dike

[permalink] [raw]
Subject: Re: 2.4.7pre8aa1

[email protected] said:
> works fine thanks! Of course I agree with rmk it would be better not
> to disable -fno-common but this is ok for now ;)

Yeah, it's temporary. rmk's idea was to use the link script to toss errno.o
out of the final binary.

> (after all we would
> catch any potential important name collision during the compiles of
> the other targets)

Agreed. -fno-common is definitely good. The only conflict is errno, but
when Arjan first started playing with -fno-common, he found a couple of UML
bugs.

Jeff

2001-07-23 01:11:53

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.7pre8aa1

On Fri, Jul 20, 2001 at 03:37:49AM +0200, Andrea Arcangeli wrote:
> On Thu, Jul 19, 2001 at 06:45:38PM -0400, Jeff Dike wrote:
> > > Only in 2.4.7pre6aa1: 51_uml-ac-to-aa-2.bz2
> > > Only in 2.4.7pre8aa1/: 51_uml-ac-to-aa-3.bz2
> > > Moved part of it in the tux directory so it can compile
> > > without tux (in reality I got errno compilation error
> > > but it's low prio and I'll sort it out later, Jeff Dike any
> > > hint is welcome ;).
> >
> > This is the patch I sent to Alan a while back which works around the problem.
> >
> > rmk suggested a better way which I'll add at some point.
> >
> > Jeff
> >
> >
> > diff -Naur -X exclude-files ac_cur/arch/um/Makefile ac/arch/um/Makefile
> > --- ac_cur/arch/um/Makefile Mon Jul 9 13:05:03 2001
> > +++ ac/arch/um/Makefile Mon Jul 9 13:26:21 2001
> > @@ -20,6 +20,8 @@
> > LINK_PROFILE = $(PROFILE) -Wl,--wrap,__monstartup
> > endif
> >
> > +CFLAGS := $(subst -fno-common,,$(CFLAGS))
> > +
> > SUBDIRS += $(ARCH_DIR)/fs $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
> > $(ARCH_DIR)/sys-$(SUBARCH)
>
> works fine thanks! Of course I agree with rmk it would be better not to

I should have said "compiles" fine (not "works" fine :).

__initdata is broken in uml and the kernel deadlocks because the wait
list is empty in complete() despite wait_for_completion actually
registered correctly into it. This because wait_for_completion runs in
a different address space than complete() and the virtual memory is not
shared across the two address spaces (it is not rempped in a MAP_SHARED
so it generates a cow). The registration is basically only private to
the entity that is registrating and it will never get visible to the
waker task that will do nothing. This is a severe bug not just for the
completion code in 2.4.7. here the fix (plus the ptrace bit):

--- ./arch/um/kernel/ptrace.c.~1~ Fri Jul 20 17:23:16 2001
+++ ./arch/um/kernel/ptrace.c Fri Jul 20 17:43:56 2001
@@ -43,7 +43,7 @@
if (request == PTRACE_ATTACH) {
if (child == current)
goto out_tsk;
- if ((!child->dumpable ||
+ if ((!ptrace_dumpable(child) ||
(current->uid != child->euid) ||
(current->uid != child->suid) ||
(current->uid != child->uid) ||
--- ./arch/um/link.ld.in.~1~ Fri Jul 20 17:23:16 2001
+++ ./arch/um/link.ld.in Mon Jul 23 03:06:40 2001
@@ -45,7 +45,6 @@
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
.text.init : { *(.text.init) }
- .data.init : { *(.data.init) }
. = ALIGN(16);
__setup_start = .;
.setup.init : { *(.setup.init) }
@@ -92,6 +91,7 @@
. = ALIGN(16384); /* init_task */
*(.data.init_task)
*(.data)
+ *(.data.init)
*(.gnu.linkonce.d*)
CONSTRUCTORS
}


(I didn't update the init_begin/end logic since there's no logic at all
in uml because we don't free that memory anyways so there's no side
effect because of that change)

> disable -fno-common but this is ok for now ;) (after all we would catch
> any potential important name collision during the compiles of the other
> targets)
>
> Andrea


Andrea

2001-07-23 02:34:36

by Jeff Dike

[permalink] [raw]
Subject: Re: 2.4.7pre8aa1

[email protected] said:
> I should have said "compiles" fine (not "works" fine :).

2.4.6 "works" fine :-)

I just finished fixing 2.4.7. My fixes are similar to yours (I moved
stext rather than moving .data.init).

> __initdata is broken in uml and the kernel deadlocks because the wait
> list is empty in complete() despite wait_for_completion actually
> registered correctly into it. This because wait_for_completion runs in
> a different address space than complete() and the virtual memory is
> not shared across the two address spaces (it is not rempped in a
> MAP_SHARED so it generates a cow). The registration is basically only
> private to the entity that is registrating and it will never get
> visible to the waker task that will do nothing. This is a severe bug
> not just for the completion code in 2.4.7.

Nice debugging, btw. I spent an hour this morning chasing that problem.

My 2.4.7 patch is available from the usual places:

http://ftp.nl.linux.org/pub/uml/uml-patch-2.4.7-1.bz2
http://uml-pub.ists.dartmouth.edu/uml/uml-patch-2.4.7-1.bz2
http://prdownloads.sourceforge.net/user-mode-linux/uml-patch-2.4.7-1.bz2

Jeff