⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1021.lowlatency.patch

📁 sm86xx内核源包括补丁( GPL )的
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/arch/i386/config.in linuxmips-2.4.30/arch/i386/config.in--- linuxmips-2.4.30.ref/arch/i386/config.in	2005-07-21 19:15:29.000000000 -0700+++ linuxmips-2.4.30/arch/i386/config.in	2005-07-22 09:36:02.000000000 -0700@@ -25,6 +25,9 @@  mainmenu_option next_comment comment 'Processor type and features'+bool 'Low latency scheduling' CONFIG_LOLAT+dep_bool 'Control low latency with sysctl' CONFIG_LOLAT_SYSCTL $CONFIG_LOLAT+ choice 'Processor family' \ 	"386					CONFIG_M386 \ 	 486					CONFIG_M486 \diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/arch/mips/config-shared.in linuxmips-2.4.30/arch/mips/config-shared.in--- linuxmips-2.4.30.ref/arch/mips/config-shared.in	2005-07-21 19:15:30.000000000 -0700+++ linuxmips-2.4.30/arch/mips/config-shared.in	2005-07-22 09:40:58.000000000 -0700@@ -802,6 +802,9 @@  bool 'Networking support' CONFIG_NET +bool 'Low latency scheduling' CONFIG_LOLAT+dep_bool '  Control low latency with sysctl' CONFIG_LOLAT_SYSCTL $CONFIG_LOLAT+ if [ "$CONFIG_ACER_PICA_61" = "y" -o \      "$CONFIG_CASIO_E55" = "y" -o \      "$CONFIG_DECSTATION" = "y" -o \diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/Documentation/Configure.help linuxmips-2.4.30/Documentation/Configure.help--- linuxmips-2.4.30.ref/Documentation/Configure.help	2005-07-21 19:15:31.000000000 -0700+++ linuxmips-2.4.30/Documentation/Configure.help	2005-07-22 09:36:03.000000000 -0700@@ -109,6 +109,23 @@    Unless you know what you are doing you *should not* enable this option. +Low latency scheduling+CONFIG_LOLAT+  This enables low latency scheduling, with reduces the scheduling+  latency of the kernel.  This makes the kernel more responsive, and+  potentially increases its bandwidth; since threads waste less time+  waiting for execution.++  If you don't know what to do here, say Y.++Control low latency with sysctl+CONFIG_LOLAT_SYSCTL+  If you say Y here, you will be able to control low latency+  scheduling using /proc/sys/kernel/lowlatency.  It will default+  to '0': low latency disabled.++  If you say N here, then low latency scheduling is always enabled.+ Symmetric Multi-Processing support CONFIG_SMP   This enables support for systems with more than one CPU. If you havediff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/block/ll_rw_blk.c linuxmips-2.4.30/drivers/block/ll_rw_blk.c--- linuxmips-2.4.30.ref/drivers/block/ll_rw_blk.c	2004-11-18 16:28:36.000000000 -0800+++ linuxmips-2.4.30/drivers/block/ll_rw_blk.c	2005-07-22 09:36:02.000000000 -0700@@ -1328,6 +1328,7 @@ 			kstat.pgpgin += count; 			break; 	}+	conditional_schedule(); }  /**diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/char/mem.c linuxmips-2.4.30/drivers/char/mem.c--- linuxmips-2.4.30.ref/drivers/char/mem.c	2004-08-14 11:38:49.000000000 -0700+++ linuxmips-2.4.30/drivers/char/mem.c	2005-07-22 09:36:02.000000000 -0700@@ -401,7 +401,7 @@ 		if (count > size) 			count = size; -		zap_page_range(mm, addr, count);+		zap_page_range(mm, addr, count, 0);         	zeromap_page_range(addr, count, PAGE_COPY);  		size -= count;diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/char/random.c linuxmips-2.4.30/drivers/char/random.c--- linuxmips-2.4.30.ref/drivers/char/random.c	2005-01-13 02:59:03.000000000 -0800+++ linuxmips-2.4.30/drivers/char/random.c	2005-07-22 09:36:02.000000000 -0700@@ -1378,6 +1378,11 @@ 		buf += i; 		ret += i; 		add_timer_randomness(&extract_timer_state, nbytes);+#if LOWLATENCY_NEEDED+		/* This can happen in softirq's, but that's what we want */+		if (conditional_schedule_needed())+			break;+#endif 	}  	/* Wipe data just returned from memory */diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/i2c/i2c-algo-bit.c linuxmips-2.4.30/drivers/i2c/i2c-algo-bit.c--- linuxmips-2.4.30.ref/drivers/i2c/i2c-algo-bit.c	2005-03-18 04:13:25.000000000 -0800+++ linuxmips-2.4.30/drivers/i2c/i2c-algo-bit.c	2005-07-22 09:36:03.000000000 -0700@@ -367,6 +367,7 @@ 			return (retval<0)? retval : -EFAULT; 			        /* got a better one ?? */ 		}+		conditional_schedule(); #if 0 		/* from asm/delay.h */ 		__delay(adap->mdelay * (loops_per_sec / 1000) );diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/i2c/i2c-core.c linuxmips-2.4.30/drivers/i2c/i2c-core.c--- linuxmips-2.4.30.ref/drivers/i2c/i2c-core.c	2004-11-29 09:47:16.000000000 -0800+++ linuxmips-2.4.30/drivers/i2c/i2c-core.c	2005-07-22 09:36:02.000000000 -0700@@ -724,6 +724,8 @@ { 	int ret; +	conditional_schedule();+ 	if (adap->algo->master_xfer) {  	 	DEB2(printk(KERN_DEBUG "i2c-core.o: master_xfer: %s with %d msgs.\n", 		            adap->name,num));@@ -746,6 +748,8 @@ 	struct i2c_adapter *adap=client->adapter; 	struct i2c_msg msg; +	conditional_schedule();+ 	if (client->adapter->algo->master_xfer) { 		msg.addr   = client->addr; 		msg.flags = client->flags & I2C_M_TEN;@@ -775,6 +779,9 @@ 	struct i2c_adapter *adap=client->adapter; 	struct i2c_msg msg; 	int ret;++	conditional_schedule();+ 	if (client->adapter->algo->master_xfer) { 		msg.addr   = client->addr; 		msg.flags = client->flags & I2C_M_TEN;diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/drivers/video/fbcon-cfb16.c linuxmips-2.4.30/drivers/video/fbcon-cfb16.c--- linuxmips-2.4.30.ref/drivers/video/fbcon-cfb16.c	2001-11-05 16:55:18.000000000 -0800+++ linuxmips-2.4.30/drivers/video/fbcon-cfb16.c	2005-07-22 09:36:03.000000000 -0700@@ -15,6 +15,7 @@ #include <linux/string.h> #include <linux/fb.h> #include <asm/io.h>+#include <linux/sched.h>  #include <video/fbcon.h> #include <video/fbcon-cfb16.h>@@ -189,6 +190,7 @@     case 4:     case 8: 	while (count--) {+	    conditional_schedule(); 	    c = scr_readw(s++) & p->charmask; 	    cdat = p->fontdata + c * fontheight(p); 	    for (rows = fontheight(p), dest = dest0; rows--; dest += bytes) {@@ -206,6 +208,7 @@     case 12:     case 16: 	while (count--) {+	    conditional_schedule(); 	    c = scr_readw(s++) & p->charmask; 	    cdat = p->fontdata + (c * fontheight(p) << 1); 	    for (rows = fontheight(p), dest = dest0; rows--; dest += bytes) {diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/fs/buffer.c linuxmips-2.4.30/fs/buffer.c--- linuxmips-2.4.30.ref/fs/buffer.c	2004-11-18 16:28:47.000000000 -0800+++ linuxmips-2.4.30/fs/buffer.c	2005-07-22 09:36:02.000000000 -0700@@ -261,8 +261,10 @@  		if (dev != NODEV && bh->b_dev != dev) 			continue;-		if (test_and_set_bit(BH_Lock, &bh->b_state))+		if (test_and_set_bit(BH_Lock, &bh->b_state)) {+			__refile_buffer(bh); 			continue;+		} 		if (buffer_delay(bh)) { 			if (write_buffer_delay(bh)) { 				if (count)@@ -278,6 +280,7 @@  			spin_unlock(&lru_list_lock); 			write_locked_buffers(array, count);+			conditional_schedule(); 			return -EAGAIN; 		} 		unlock_buffer(bh);@@ -311,12 +314,19 @@ 	struct buffer_head * next; 	int nr; -	next = lru_list[index]; 	nr = nr_buffers_type[index];+repeat:+	next = lru_list[index]; 	while (next && --nr >= 0) { 		struct buffer_head *bh = next; 		next = bh->b_next_free; +		if (conditional_schedule_needed()) {+			spin_unlock(&lru_list_lock);+			unconditional_schedule();+			spin_lock(&lru_list_lock);+			goto repeat;+		} 		if (!buffer_locked(bh)) { 			if (refile) 				__refile_buffer(bh);@@ -324,7 +334,6 @@ 		} 		if (dev != NODEV && bh->b_dev != dev) 			continue;- 		get_bh(bh); 		spin_unlock(&lru_list_lock); 		wait_on_buffer (bh);@@ -357,6 +366,15 @@ { 	int err = 0; +#if LOWLATENCY_NEEDED+	/*+	 * syncing devA when there are lots of buffers dirty against+	 * devB is expensive.+	 */+	if (enable_lowlatency)+		dev = NODEV;+#endif+ 	/* One pass for no-wait, three for wait: 	 * 0) write out all dirty, unlocked buffers; 	 * 1) wait for all dirty locked buffers;@@ -724,6 +742,7 @@ 	int i, nlist, slept; 	struct buffer_head * bh, * bh_next; 	kdev_t dev = to_kdev_t(bdev->bd_dev);	/* will become bdev */+	int lolat_retry = 0;   retry: 	slept = 0;@@ -741,6 +760,17 @@ 			/* Not hashed? */ 			if (!bh->b_pprev) 				continue;++			if (lolat_retry < 10 && conditional_schedule_needed()) {+				get_bh(bh);+				spin_unlock(&lru_list_lock);+				unconditional_schedule();+				spin_lock(&lru_list_lock);+				put_bh(bh);+				slept = 1;+				lolat_retry++;+			}+ 			if (buffer_locked(bh)) { 				get_bh(bh); 				spin_unlock(&lru_list_lock);@@ -892,12 +922,18 @@ 	struct buffer_head *bh; 	struct list_head tmp; 	int err = 0, err2;-	+	DEFINE_RESCHED_COUNT;+ 	INIT_LIST_HEAD(&tmp);-	+repeat: 	spin_lock(&lru_list_lock);  	while (!list_empty(list)) {+		if (conditional_schedule_needed()) {+			spin_unlock(&lru_list_lock);+			unconditional_schedule();+			goto repeat;+		} 		bh = BH_ENTRY(list->next); 		list_del(&bh->b_inode_buffers); 		if (!buffer_dirty(bh) && !buffer_locked(bh))@@ -922,8 +958,18 @@ 				spin_lock(&lru_list_lock); 			} 		}+		if (TEST_RESCHED_COUNT(32)) {+			RESET_RESCHED_COUNT();+			if (conditional_schedule_needed()) {+				spin_unlock(&lru_list_lock);+				unconditional_schedule();+				spin_lock(&lru_list_lock);+			}+		} 	} +	RESET_RESCHED_COUNT();+ 	while (!list_empty(&tmp)) { 		bh = BH_ENTRY(tmp.prev); 		remove_inode_queue(bh);@@ -933,6 +979,7 @@ 		if (!buffer_uptodate(bh)) 			err = -EIO; 		brelse(bh);+		conditional_schedule(); 		spin_lock(&lru_list_lock); 	} 	@@ -960,11 +1007,20 @@ 	struct buffer_head *bh; 	struct list_head *p; 	int err = 0;+	DEFINE_RESCHED_COUNT; +repeat:+	conditional_schedule(); 	spin_lock(&lru_list_lock);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -