Skip to contentSkip to conversation

2.4.19pre8aa1 & vm-34

DISCUSSION Andrea Arcangeli 3 participants 13 messages May 3, 2002 – May 5, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Full patchkit:

	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1/

Only VM updates:

	http://www.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.19pre8/vm-34.gz
	http://www.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.19pre8/vm-34/

Diff between 2.4.19pre7aa3 and 2.4.19pre8aa1 besides moving from pre7 to pre8:

Only in 2.4.19pre7aa3: 00_19pre7_x86_setup_cleanups-1 Only in 2.4.19pre7aa3: 00_backout-kio-request-1 Only in 2.4.19pre7aa3: 00_bh-IPI-1
Only in 2.4.19pre7aa3: 00_k7-prefetch-1
Only in 2.4.19pre7aa3: 00_kiobuf_init-1
Only in 2.4.19pre7aa3: 00_spinlock-cacheline-3 Only in 2.4.19pre7aa3: 00_std-serial-first-1 Only in 2.4.19pre7aa3: 00_timer_bh-deadlock-1

	Merged in mainline. BTW, please merge also the other part of the
	10_tlb-state now called 10_tlb-state-2.

Only in 2.4.19pre7aa3: 00_block-highmem-all-18b-10.gz Only in 2.4.19pre8aa1: 00_block-highmem-all-18b-11.gz Only in 2.4.19pre7aa3: 00_nfs-rpc-ping-1
Only in 2.4.19pre8aa1: 00_nfs-rpc-ping-2
Only in 2.4.19pre7aa3: 00_rwsem-fair-28
Only in 2.4.19pre7aa3: 00_rwsem-fair-28-recursive-8 Only in 2.4.19pre8aa1: 00_rwsem-fair-29
Only in 2.4.19pre8aa1: 00_rwsem-fair-29-recursive-8 Only in 2.4.19pre7aa3: 05_vm_17_rest-3
Only in 2.4.19pre8aa1: 05_vm_17_rest-4
Only in 2.4.19pre7aa3: 10_rawio-vary-io-7 Only in 2.4.19pre8aa1: 10_rawio-vary-io-8 Only in 2.4.19pre7aa3: 10_tlb-state-1
Only in 2.4.19pre8aa1: 10_tlb-state-2
Only in 2.4.19pre7aa3: 30_dyn-sched-5
Only in 2.4.19pre8aa1: 30_dyn-sched-6
Only in 2.4.19pre7aa3: 30_x86_setup-boot-cleanup-2 Only in 2.4.19pre8aa1: 30_x86_setup-boot-cleanup-3 Only in 2.4.19pre7aa3: 60_tux-exports-2
Only in 2.4.19pre8aa1: 60_tux-exports-3
Only in 2.4.19pre7aa3: 70_xfs-1.1-0.gz
Only in 2.4.19pre8aa1: 70_xfs-1.1-1.gz

Rediffed due rejects.

Only in 2.4.19pre7aa3: 00_nfs-tcp-tweaks-4
Only in 2.4.19pre7aa3: 00_nfs-tcp-tweaks-4-rmv-cong-nonsense-3

Replaced by mainline.

Only in 2.4.19pre7aa3: 00_wake_up_page-1

Backed out because superflous. (noticed by Christoph Hellwig)

Only in 2.4.19pre7aa3: 81_x86_64-arch-5.gz Only in 2.4.19pre8aa1: 81_x86_64-arch-6.gz Only in 2.4.19pre8aa1: 84_x86_64-io-compile-1 Only in 2.4.19pre7aa3: 84_x86_64-out_of_line_bug-1 Only in 2.4.19pre7aa3: 85_x86_64-mmx-xmm-init-3 Only in 2.4.19pre8aa1: 85_x86_64-mmx-xmm-init-4

Latest updates from cvs.x86-64.org CVS.

Andrea

#1 lore raw

Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error

Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build, a declaration is put in an illegal place.

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

*** linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c.orig Sat May 4 10:13:57 2002
--- linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c Sat May 4 10:14:28 2002
***************
*** 204,214 ****
sigfillset(&current->blocked);
lock_kernel();
if ((result = ftape_mmap(vma)) >= 0) {
- vma->vm_flags &= ~VM_IO;
#ifndef MSYNC_BUG_WAS_FIXED
static struct vm_operations_struct dummy = { NULL, }; vma->vm_ops = &dummy;
#endif
}
unlock_kernel();
current->blocked = old_sigmask; /* restore mask */
--- 204,214 ----
sigfillset(&current->blocked);
lock_kernel();
if ((result = ftape_mmap(vma)) >= 0) {
#ifndef MSYNC_BUG_WAS_FIXED
static struct vm_operations_struct dummy = { NULL, }; vma->vm_ops = &dummy;
#endif
+ vma->vm_flags &= ~VM_IO;
}
unlock_kernel();
current->blocked = old_sigmask; /* restore mask */

#3 lore raw

Re: 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error

In reply to Andrea Arcangeli
Quoted 4 lines · Andrea Arcangeli

Full patchkit:

        http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This problem was in -pre7, fixed in -pre8, yet it is back in -pre8-aa1!

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

drivers/net/wan/8253x/8253xutl.c renamed from drivers/net/wan/8253x/8253xutl.c.orig +0 -1
@@ -1344,7 +1344,6 @@
 	while ((Sab8253xCountTransmit(port) > 0) || !port->all_sent) 
 	{
 		current->state = TASK_INTERRUPTIBLE;
-		current->counter = 0;
 		schedule_timeout(char_time);
 		if (signal_pending(current))
 		{
#4 lore raw

Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable

In reply to Andrea Arcangeli
Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This is a new symbol introduced in -aa1. It ends up in drivers through new header definitions rather than by direct use.

Should be exported?

depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/ieee1394/dv1394.o
depmod: kmap_pagetable
depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/net/wan/comx.o
depmod: proc_get_inode
depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/video/NVdriver
depmod: kmap_pagetable

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

#6 lore raw

Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable

In reply to Andrea Arcangeli
Quoted 9 lines · Eyal Lebedinsky
Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This is a new symbol introduced in -aa1. It ends up in drivers through new header definitions rather than by direct use.

Should be exported?

You should #include <linux/highmem.h> in those drivers .c files, then it will compile, but that's not the right fix, you'd need to add the pte_kunmap too or it would deadlock with highmem. The right fix is to convert those drivers to vmalloc_to_page, then they will work flawlessy. Alan actually has a patch in his -ac that converted most usb and other drivers to vmalloc_to_page, I will merge it plus I will convert those below drivers if they're not just covered by Alan's patch. Alan could you push it to Marcelo?

After I finished covering all the compilation failures you reported I will upload an aa2 with all your patches included. I usually don't compile every driver out there so I didn't noticed those problems, sorry.

Quoted 8 lines

depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/ieee1394/dv1394.o
depmod: kmap_pagetable
depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/net/wan/comx.o
depmod: proc_get_inode

actually comx is unrealted to the pte-highmem problem, to fix it we should EXPORT_SYMBOL(proc_get_inode), but I'm not sure why it wants to implement the dir lookup by itself instead of relying on the procfs layer, probably to allow more functionality like mkdir/rmdir.

Quoted 6 lines

depmod: *** Unresolved symbols in /lib/modules/2.4.19-pre8-aa1/kernel/drivers/video/NVdriver
depmod: kmap_pagetable

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

Andrea

#7 lore raw

Re: 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure

In reply to Andrea Arcangeli
Quoted 11 lines · Andrea Arcangeli
Quoted 8 lines · Eyal Lebedinsky
Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

'struct kiobuf' does not have a member 'blocks', used in two places.

Should it use 'kio_blocks'?

yes. What are the two places?

never mind, this should fix it:

drivers/mtd/devices/blkmtd.c renamed from drivers/mtd/devices/blkmtd.c.~1~ +2 -2
@@ -235,7 +235,7 @@
     return -ENOMEM;
   }
 #else 
-  blocks = iobuf->blocks;
+  blocks = iobuf->kio_blocks;
 #endif
 
   iobuf->offset = 0;
@@ -329,7 +329,7 @@
     return 0;
   }
 #else 
-  blocks = iobuf->blocks;
+  blocks = iobuf->kio_blocks;
 #endif
 
   DEBUG(2, "blkmtd: writetask: entering main loop\n");

Andrea

#8 lore raw

Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable

In reply to Andrea Arcangeli
Quoted 10 lines · Andrea Arcangeli
Quoted 8 lines · Eyal Lebedinsky
Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This is a new symbol introduced in -aa1. It ends up in drivers through new header definitions rather than by direct use.

Quoted 6 lines
Quoted 1 line

Should be exported?

You should #include <linux/highmem.h> in those drivers .c files, then it will compile, but that's not the right fix, you'd need to add the pte_kunmap too or it would deadlock with highmem. The right fix is to convert those drivers to vmalloc_to_page, then they will work flawlessy.

Well, this may be a problem for NVdriver (a mostly binary only driver) which I use.

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

#9 lore raw

Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable

In reply to Andrea Arcangeli
Quoted 2 lines · Eyal Lebedinsky

Well, this may be a problem for NVdriver (a mostly binary only driver) which I use.

This should fix it:

nv.c +7 -4
diff -urN NVIDIA_kernel-1.0-2313/nv.c NVIDIA_kernel-1.0-2313.pte-highmem/nv.c
@@ -42,6 +42,7 @@
 #include <linux/interrupt.h>           
 #include <linux/tqueue.h>               // struct tq_struct 
 #include <linux/poll.h>
+#include <linux/highmem.h>
 #ifdef CONFIG_PM
 #include <linux/pm.h>                   // power management
 #endif
@@ -2267,7 +2268,7 @@
 {
     pgd_t *pg_dir;
     pmd_t *pg_mid_dir;
-    pte_t *pg_table;
+    pte_t *pg_table, pte;
 
     /* XXX do we really need this? */
     if (address > VMALLOC_START)
@@ -2297,11 +2298,13 @@
     if (pmd_none(*pg_mid_dir))
         goto failed;
 
-    pg_table = pte_offset(pg_mid_dir, address);
-    if (!pte_present(*pg_table))
+    pg_table = pte_offset_atomic(pg_mid_dir, address);
+    pte = *pg_table;
+    pte_kunmap(pg_table);
+    if (!pte_present(pte))
         goto failed;
 
-    return ((pte_val(*pg_table) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
+    return ((pte_val(pte) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
 
   failed:
     return (unsigned long) NULL;

Andrea

#10 lore raw

Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable

In reply to Andrea Arcangeli

nv.c Sun Feb 3 16:35:18 2002

Quoted 10 lines · Andrea Arcangeli
Quoted 2 lines · Eyal Lebedinsky

Well, this may be a problem for NVdriver (a mostly binary only driver) which I use.

This should fix it:

diff -urN NVIDIA_kernel-1.0-2313/nv.c .pte-highmem/nv.c

nv.c Sun Feb 3 16:35:18 2002 renamed from nv.c Tue Nov 27 21:39:17 2001 +0 -0

Applied to NVIDIA_kernel-1.0-2880 and it builds fine (on -aa2) and booted OK. Thanks.

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

#11 lore raw

Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error

In reply to Andrea Arcangeli
Quoted 8 lines · Eyal Lebedinsky
Quoted 3 lines · Andrea Arcangeli

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build, a declaration is put in an illegal place.

Why is it illegal to put that before the ifdef instead of after?

That's a litle strange looking diff output, what version is it?

Which compiler gave the error?

#12 lore raw

Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error

In reply to Andrea Arcangeli
Quoted 4 lines · Mike Fedyk
Quoted 2 lines · Eyal Lebedinsky
Quoted 1 line · Andrea Arcangeli
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Full patchkit:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build, a declaration is put in an illegal place.

Why is it illegal to put that before the ifdef instead of after?

In standard C, declarations must precede statements in a block. When the #if is true, the declaration is exposed, and it is after an assignment, a syntax error.

The most general solution is to always open a new block if you need a declaration, but here the code fragment is small enough to not do so (but one needs to be alert).

#if ...

{
	int	x;
	x = ...
}

#endif

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>