Nick Piggin | 1 Apr 01:03 2003
Picon

Re: Delaying writes to disk when there's no need


Andrew Morton wrote:

>Nick Piggin <piggin <at> cyberone.com.au> wrote:
>  
>
>>it seems to me that
>>doing writeout whenever the disk would otherwise be idle
>>(and we have dirty memory to write out) would be a good
>>solution.
>>    
>>
>
>This is what the recently-removed BDI_read_active flag in backing_dev_info
>was supposed to be for.  I let it go because I don't think it's terribly
>important and it's time to stop fiddling with the vfs writeout code and it
>wasn't right anyway.
>
>Note that 2.5 starts pdflush writeout at 10% of memory dirty.  Or even lower
>if there is a lot of mapped memory around.  Whereas 2.4 will start background
>writeout at 30% or 40% dirty.  That's a fairly significant tuning change.
>
>The algorithm for utilisation of an idle disk should be, in
>balance_dirty_pages():
>
>	if (ps.nr_dirty + ps.nr_writeback < background_thresh) {
>		if (time_after(jiffies, bdi->last_read + HZ/100)) {
>			if (bdi->write_requests_in_flight < 2) {
>				struct writeback_control wbc = {
>					.bdi		= bdi,
(Continue reading)

Joel Becker | 1 Apr 01:07 2003
Picon

Re: 64-bit kdev_t - just for playing

On Mon, Mar 31, 2003 at 11:32:55PM +0200, Roman Zippel wrote:
> later. The ones who ask now for a larger dev_t the loudest are likely the 
> first to demand later not change anything for "compability", because they 
> hardcoded certain assumptions about dev_t into their applications.

	I'm right here campaigning loudly for a larger dev_t.  I intend
to never, ever make assumptions about dev_t.  In fact, I'd rather not
deal with dev_t.  But I do need a way to map 4k or 8k or 16k disks.
now.

Joel

--

-- 

"Up and down that road in our worn out shoes,
 Talking bout good things and singing the blues."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker <at> oracle.com
Phone: (650) 506-8127
Stephen Hemminger | 1 Apr 01:12 2003

[PATCH 2.5.66] sychronize_net patch (1/2)

Several places are all doing the same thing to synchronize with network
receive BH.  This patch for 2.5.66 moves this into a new function
synchronize_net.

By putting it in one place, it gets the brlock semantics out of several
places. The motivation is that eventually on 2.5 based kernels the
function can call synchronize_kernel for RCU but leave the 2.4 code
alone. 

diff -urN -X dontdiff linux-2.4/include/linux/netdevice.h linux-2.4-netsync/include/linux/netdevice.h
--- linux-2.4/include/linux/netdevice.h	2003-03-31 11:09:07.000000000 -0800
+++ linux-2.4-netsync/include/linux/netdevice.h	2003-03-31 06:25:34.000000000 -0800
 <at>  <at>  -474,6 +474,7  <at>  <at> 
 extern int		dev_queue_xmit(struct sk_buff *skb);
 extern int		register_netdevice(struct net_device *dev);
 extern int		unregister_netdevice(struct net_device *dev);
+extern void		synchronize_net(void);
 extern int 		register_netdevice_notifier(struct notifier_block *nb);
 extern int		unregister_netdevice_notifier(struct notifier_block *nb);
 extern int		dev_new_index(void);
diff -urN -X dontdiff linux-2.4/net/core/dev.c linux-2.4-netsync/net/core/dev.c
--- linux-2.4/net/core/dev.c	2003-03-31 11:09:09.000000000 -0800
+++ linux-2.4-netsync/net/core/dev.c	2003-03-31 14:26:11.000000000 -0800
 <at>  <at>  -2508,6 +2508,12  <at>  <at> 
 	return 0;
 }

+/* Synchronize with packet receive processing. */
+void synchronize_net() {
+	br_write_lock_bh(BR_NETPROTO_LOCK);
(Continue reading)

Stephen Hemminger | 1 Apr 01:13 2003

[PATCH 2.5.66] sychronize_net patch (2/2)

Use the new synchronize_net function for all the place in netfilter that
call lock/unlock just to assure that net packets don't see old data.

By putting it in one place, it gets the brlock semantics out of several
places. The motivation is that eventually on 2.5 based kernels the
function can call synchronize_kernel for RCU but leave the 2.4 code
alone. In future, these places can sleep since they are called during
module unload when unregistering.

diff -urN -X dontdiff linux-2.5/net/ipv4/netfilter/ip_conntrack_core.c linux-2.5-netsync/net/ipv4/netfilter/ip_conntrack_core.c
--- linux-2.5/net/ipv4/netfilter/ip_conntrack_core.c	2003-03-31 10:46:01.000000000 -0800
+++ linux-2.5-netsync/net/ipv4/netfilter/ip_conntrack_core.c	2003-03-31 13:42:42.000000000 -0800
 <at>  <at>  -24,7 +24,6  <at>  <at> 
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
 #include <linux/vmalloc.h>
-#include <linux/brlock.h>
 #include <net/checksum.h>
 #include <linux/stddef.h>
 #include <linux/sysctl.h>
 <at>  <at>  -1160,8 +1159,7  <at>  <at> 
 	WRITE_UNLOCK(&ip_conntrack_lock);

 	/* Someone could be still looking at the helper in a bh. */
-	br_write_lock_bh(BR_NETPROTO_LOCK);
-	br_write_unlock_bh(BR_NETPROTO_LOCK);
+	synchronize_net();
 }

 /* Refresh conntrack for this many jiffies. */
(Continue reading)

Rusty Russell | 1 Apr 01:18 2003
Picon

[PATCH] Re-xmit: PCI IDs module alias fix

Linus, please apply (OK'd by Greg Kroah-Hartmann).

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: Subdivide PCI class for aliases
Author: Rusty Russell
Status: Tested on 2.5.66-bk2

D: The previous handling of PCI class masks was too primitive: the
D: class field is not "all or nothing" but has base class, subclass
D: and interface fields.  This patch changes the alias form from:
D: pci:vNdNsvNsdNcN to pci:vNdNsvNsdNbcNscNiN.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
linux-2.5.66-bk2/scripts/file2alias.c working-2.5.66-bk2-pci-alias/scripts/file2alias.c
--- linux-2.5.66-bk2/scripts/file2alias.c	2003-02-18 11:18:57.000000000 +1100
+++ working-2.5.66-bk2-pci-alias/scripts/file2alias.c	2003-03-27 16:35:37.000000000 +1100
 <at>  <at>  -81,10 +81,14  <at>  <at>  static int do_usb_entry(const char *file
 	return 1;
 }

-/* Looks like: pci:vNdNsvNsdNcN. */
+/* Looks like: pci:vNdNsvNsdNbcNscNiN. */
 static int do_pci_entry(const char *filename,
 			struct pci_device_id *id, char *alias)
 {
+	/* Class field can be divided into these three. */
+	unsigned char baseclass, subclass, interface,
(Continue reading)

jmduthie | 1 Apr 01:23 2003
Picon

Re: Query about SIS963 Bridges

On 24 Mar 2003, Alan Cox wrote:

-> Date: 24 Mar 2003 00:50:41 +0000
-> From: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
-> To: John M Collins <jmc <at> xisl.com>
-> Cc: Linux Kernel Mailing List <linux-kernel <at> vger.kernel.org>
-> Subject: Re: Query about SIS963 Bridges
->
-> On Sun, 2003-03-23 at 23:31, John M Collins wrote:
-> > I've just got a new machine (2.5 GHz pentium lots of RAM and disk space)
-> > which has one of these SIS963 Southbridge creatures and I get the
-> > message on booting a 2.4.19ish sort of kernel.
->
-> The SiS963 is currently a winputer.

Nooooooooo!
Arrgh !
darn
no wonder my setup is broken after that H/W upgrade

2.2.20 actually works with my PCI NIC (no support for my paradise ATA)
2.4.x does not work with nic or (00:0b.0 Unknown mass storage controller:
                                 Promise Technology, Inc.: Unknown device
                                 4d68 (rev 01) )
2.4.20 slackware 9.0 bare.i works with the PCI NIC and PCI ATA card (no
acpi in this kernel)

is ACPI the problem with this chipset ?

I'd like to get this board working is there any information I can provide that would give
(Continue reading)

Rusty Russell | 1 Apr 01:21 2003
Picon

[PATCH] Re-xmit: module code tidyup

Linus, please apply.

Three patches (applicable with one patch -p1):

o Make module_text_address return the module found, not just true/false.
o Remove struct kernel_symbol_group: just iterate through the modules.
o Remove struct exception_table: just iterate through the modules.

These cleanups made possible by the fact that symbol and exception
table traversal now entirely within kernel/module.c.

Thanks,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: module_text_address returns the module
Author: Rusty Russell
Status: Trivial

D: By making module_text_address return the module it found, we
D: simplify symbol_put_addr significantly.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal
.19470-linux-2.5.66-bk2/include/linux/module.h .19470-linux-2.5.66-bk2.updated/include/linux/module.h
--- .19470-linux-2.5.66-bk2/include/linux/module.h	2003-03-25 12:17:31.000000000 +1100
+++ .19470-linux-2.5.66-bk2.updated/include/linux/module.h	2003-03-27 15:08:54.000000000 +1100
 <at>  <at>  -268,7 +268,7  <at>  <at>  static inline int module_is_live(struct 
 }

(Continue reading)

Roman Zippel | 1 Apr 01:35 2003

Re: 64-bit kdev_t - just for playing

Hi,

On Mon, 31 Mar 2003, Joel Becker wrote:

> 	I'm right here campaigning loudly for a larger dev_t.  I intend
> to never, ever make assumptions about dev_t.  In fact, I'd rather not
> deal with dev_t.  But I do need a way to map 4k or 8k or 16k disks.
> now.

Fine, so write the software to do this, but what exactly is there still 
for the kernel to do?

bye, Roman

Kai Germaschewski | 1 Apr 01:40 2003
Picon

Re: [PATCH] Put all functions in kallsyms

On Mon, 31 Mar 2003, Rusty Russell wrote:

> 	Simple, untested patch.  Any objections?

No objection, but you need to adapt the test in
kernel/kallsyms.c:

	if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) {

and in kernel/extable.c:

	if (addr >= (unsigned long)_stext &&
	    addr <= (unsigned long)_etext)

Otherwise, you'd just add bloat with no gain at all ;)

--Kai

Ingo Oeser | 1 Apr 01:32 2003
Picon

Re: Delaying writes to disk when there's no need

On Mon, Mar 31, 2003 at 02:45:00PM -0800, Andrew Morton wrote:
> It could have pretty bad failure modes.  Short-lived files in /tmp now
> perform writeout, which needs to be waited on when those files are removed.

/tmp is not a problem, because this can be fixed by using tmpfs
(I use 2GB of it with 1GB of RAM).

Bad are the small writes generated by the proposed behavior. 

The disk is idle, so this is not about performance, but power
consumption. Spinning up a disk costs around 1-2 seconds, so you
should come in with at least the amount of data you write in 1-2
seconds for a spun down disk.

Regards

Ingo Oeser
--

-- 
Marketing ist die Kunst, Leuten Sachen zu verkaufen, die sie
nicht brauchen, mit Geld, was sie nicht haben, um Leute zu
beeindrucken, die sie nicht moegen.

Gmane