2.5.65-mm2
Subsystems (4)
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
will appear sometime at:
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.65/2.5.65-mm2/
. Added all the 32-bit dev_t patches.
. An update to the brlock-removal patches which might fix the reported
netfilter problems (would like confirmation of this please).
Changes since 2.5.65-mm1:
+linus.patch
Latest from Linus
-noirqbalance-fix.patch
-ppc64-64-bit-exec-fix.patch
-remove-unused-congestion-stuff.patch
-smalldevfs.patch
-timer-cleanup.patch
-timer-readdition-fix.patch
-set_current_state-fs.patch
-set_current_state-mm.patch
-copy_thread-leak-fix.patch
-file_list_lock-contention-fix.patch
-tty_files-fixes.patch
-file_list_cleanup.patch
-file_list-remove-free_list.patch
-file-list-less-locking.patch
-vt_ioctl-stack-use.patch
-no-mmu-stubs.patch
-nommu-slab.patch
-nfs-memleak-fix.patch
-ufs-memleak-fix.patch
-posix-timers-update.patch
-oops-counters.patch
-io_apic-DO_ACTION-cleanup.patch
-oprofile-timer-fix.patch
-pgd_index-comments.patch
-proc-sysrq-trigger.patch
-CONFIG_NUMA-fixes.patch
-nfsd-symlink-failpath.patch
-get_disk-error-checking.patch
-nanosleep-accuracy-fix.patch
Merged
+as-predict-data-direction.patch
Anticipatory scheduler work: starting to track per-process behaviour a little more.
-brlock-removal-1.patch
+brlock-1b.patch
Updated (might fix a netfilter problem)
+nanosleep-accuracy-fix-2.patch
Another go at fixing the nanosleep() inaccuracy.
+linear-oops-fix-1.patch
Fix oops in the MD linear driver
+dev_t-1-kill-cdev.patch
+dev_t-2-remove-MAX_CHRDEV.patch
+dev_t-3-major_h-cleanup.patch
+dev_t-32-bit.patch
+dev_t-drm-warnings.patch
+dev_t-remove-B_FREE.patch
32-bit dev_t work
+cpufreq-xtime-locking.patch
locking fix
+cs46xx-fixes.patch
Minor fixes
+notsclock-option.patch
Add "notsclock" boot option for misbehaving SpeedStep machines.
+tty-put_user-checks.patch
Fix some missing uaccess checks.
+fail-setup_irq-for-unconfigured-IRQs.patch
Stuff from Zwane.
+raw-fix-address_space-rewriting.patch
+raw-cleanups-and-fixlets.patch
Fixes for the raw driver
+oops-dump-preceding-code.patch
Make the ia32 oops code dump instructions which preceded the failing EIP. Keith has ksymoops support for this and it works nicely. I'm not sure what his plans are for adding it to a released version.
All 105 patches:
linus.patch
Latest from Linus
mm.patch
add -mmN to EXTRAVERSION
kgdb.patch
kgdb-cleanup.patch
make kgdb less invasive (when disabled)
proc-sys-debug.patch
create /proc/sys/debug/0 ... 7
config_spinline.patch
uninline spinlocks for profiling accuracy.
ppc64-reloc_hide.patch
ppc64-pci-patch.patch
Subject: pci patch
ppc64-aio-32bit-emulation.patch
32/64bit emulation for aio
ppc64-scruffiness.patch
Fix some PPC64 compile warnings
sym-do-160.patch
make the SYM driver do 160 MB/sec
config-PAGE_OFFSET.patch
Configurable kenrel/user memory split
ptrace-flush.patch
cache flushing in the ptrace code
buffer-debug.patch
buffer.c debugging
warn-null-wakeup.patch
ext3-truncate-ordered-pages.patch
ext3: explicitly free truncated pages
reiserfs_file_write-5.patch
tcp-wakeups.patch
Use fast wakeups in TCP/IPV4
rcu-stats.patch
RCU statistics reporting
ext3-journalled-data-assertion-fix.patch
Remove incorrect assertion from ext3
nfs-speedup.patch
nfs-oom-fix.patch
nfs oom fix
sk-allocation.patch
Subject: Re: nfs oom
nfs-more-oom-fix.patch
rpciod-atomic-allocations.patch
Make rcpiod use atomic allocations
linux-isp.patch
isp-update-1.patch
kblockd.patch
Create `kblockd' workqueue
as-iosched.patch
anticipatory I/O scheduler
as-debug-BUG-fix.patch
as-eject-BUG-fix.patch
AS: don't go BUG during cdrom eject
as-jumbo-fix.patch
AS: OSDL fixes
as-request_fn-in-timer.patch
Remove the scheduled_work thing
as-remove-request-fix.patch
as-np-1.patch
as: cleanups & comments
as-use-kblockd.patch
as-cleanup-2.patch
AS: cleanup + comments
as-as_remove_request-simplification.patch
as: as_remove_request simplification
as-dont-go-BUG-again.patch
as-handle-non-block-requests.patch
AS: handle non-block requests
as-np-reads-1.patch
AS: read-vs-read fixes
as-np-reads-2.patch
AS: more read-vs-read fixes
as-predict-data-direction.patch
as: predict direction of next IO
cfq-2.patch
CFQ scheduler, #2
unplug-use-kblockd.patch
Use kblockd for running request queues
remap-file-pages-2.5.63-a1.patch
Subject: [patch] remap-file-pages-2.5.63-A1
hugh-remap-fix.patch
hugh's file-offset-in-pte fix
fremap-limit-offsets.patch
fremap: limit remap_file_pages() file offsets
fremap-all-mappings.patch
Make all executable mappings be nonlinear
filemap_populate-speedup.patch
filemap_populate speedup
file-offset-in-pte-x86_64.patch
x86_64: support for file offsets in pte's
file-offset-in-pte-ppc64.patch
objrmap-2.5.62-5.patch
object-based rmap
objrmap-nonlinear-fixes.patch
objrmap fix for nonlinear
sched-2.5.64-D3.patch
sched-2.5.64-D3, more interactivity changes
scheduler-tunables.patch
scheduler tunables
show_task-free-stack-fix.patch
show_task() fix and cleanup
yellowfin-set_bit-fix.patch
yellowfin driver set_bit fix
htree-nfs-fix.patch
Fix ext3 htree / NFS compatibility problems
update_atime-ng.patch
inode a/c/mtime modification speedup
one-sec-times.patch
Implement a/c/time speedup in ext2 & ext3
task_prio-fix.patch
simple task_prio() fix
slab_store_user-large-objects.patch
slab debug: perform redzoning against larger objects
pcmcia-2.patch
pcmcia-3b.patch
pcmcia-3.patch
pcmcia-4.patch
pcmcia-5.patch
pcmcia-6.patch
pcmcia-7b.patch
pcmcia-7.patch
pcmcia-8.patch
pcmcia-9.patch
pcmcia-10.patch
htree-nfs-fix-2.patch
htree nfs fix
ext2-no-lock_super.patch
concurrent block allocation for ext2
ext2-ialloc-no-lock_super.patch
concurrent inode allocation for ext2
brlock-1b.patch
Re: 2.5.64-mm8 breaks MASQ
brlock-removal-2.patch
brlock removal 2/5: remove brlock from snap and vlan
brlock-removal-3.patch
brlock removal 3/5: remove brlock from bridge
brlock-removal-4.patch
brlock removal 4/5: removal from ipv4/ipv6
brlock-removal-5.patch
brlock removal 5/5: remove brlock code
lseek-ext2_readdir.patch
remove lock_kernel() from readdir implementations.
inode_setattr-lock_kernel-removal.patch
remove lock_kernel() from inode_setattr's vmtruncate() call
ide_probe-init_irq-fix.patch
ide-probe init_irq cleanup
raid1-fix.patch
MD RAID1 fix
nmi-watchdog-fix.patch
NMI watchdog fix
vm_enough_memory-speedup.patch
speed up vm_enough_memory()
nanosleep-accuracy-fix-2.patch
fix nanosleep() granularity bumps
linear-oops-fix-1.patch
md/linear oops fix
dev_t-1-kill-cdev.patch
dev_t [1/3]: kill cdev
dev_t-2-remove-MAX_CHRDEV.patch
dev_t [2/3] - remove MAX_CHRDEV
dev_t-3-major_h-cleanup.patch
dev_t [3/3]: major.h cleanups
dev_t-32-bit.patch
[for playing only] change type of dev_t
dev_t-drm-warnings.patch
dev_t: fix drm printk warnings
dev_t-remove-B_FREE.patch
dev_t: eliminate B_FREE
smalldevfs.patch
smalldevfs
cpufreq-xtime-locking.patch
add write_seqlock to cpufreq change notifier for TSC
cs46xx-fixes.patch
cs46xx minor fixes
notsclock-option.patch
boot time parameter to turn of TSC usage
tty-put_user-checks.patch
Add missing put_user checks in n_tty
fail-setup_irq-for-unconfigured-IRQs.patch
Fail setup_irq for unconfigured IRQs
raw-fix-address_space-rewriting.patch
raw driver: rewrite i_mapping only on final close
raw-cleanups-and-fixlets.patch
raw driver: cleanups and small fixes
oops-dump-preceding-code.patch
i386 oops output: dump preceding code
Quoted 3 lines · Andrew Morton
[SNIP]
Heres a minor snag during depmod at installation of modules:
WARNING: /lib/modules/2.5.65-mm2/kernel/drivers/hotplug/acpiphp.ko needs unknown symbol acpi_resource_to_address64
It's been around a while. My .config is attached.
mvh,
A
Signature · 4 lines
-- Alexander Hoogerhuis | [email protected] CCNP - CCDP - MCNE - CCSE | +47 908 21 485 "You have zero privacy anyway. Get over it." --Scott McNealy
Quoted 3 lines · Andrew Morton
[SNIP]
Yay! Still working Radeon :)
And 4x AGP:
agpgart: Putting AGP V2 device at 00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 01:00.0 into 4x mode
Come to think of it, I'll give it a spin, this might be due to a working DSDT table that was compiled in with ACPI, whereas I had the 1x problems before I did this.
mvh,
A
Signature · 3 lines
Alexander Hoogerhuis | [email protected] CCNP - CCDP - MCNE - CCSE | +47 908 21 485 "You have zero privacy anyway. Get over it." --Scott McNealy
Quoted 3 lines · Andrew Morton
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
. An update to the brlock-removal patches which might fix the reported
netfilter problems (would like confirmation of this please).
Yup, works again.
Where 2.5.64-mm7 & 2.5.65-mm1 didn't forward packets on my firewall.
Zanks !
Danny
Signature · 2 lines
Miguel | "I can't tell if I have worked all my life or if de Icaza | I have never worked a single day of my life,"
Quoted 3 lines · Andrew Morton
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
I am seeing a significant degradation of interactivity under load with recent -mm kernels. The load is dbench on a reiserfs file system with increasing numbers of clients. The test machine is single PIII, IDE, 256MB memory, all kernels PREEMPT.
Specifying elevator=deadline improved the response of 2.5.65-mm2 somewhat, but it still eventually became intolerably slow with sufficient load.
Interactivity tests consisted of switching between desktops with two instances of Mozilla 1.3 on separate desktops, and Evolution 1.2.2 on another desktop. Additional tests included shaking the window and wiggling the scrollbar.
The third and fourth columns list the number of dbench clients at which interactivity becomes poor, or intolerable, defined here as getting a response after:
good less than 1 second
poor seconds
intolerable tens of seconds
kernel interactivity under load (dbench clients)
good poor intolerable
2.5.65-bk 56*
2.5.65-mm1 <8 16 24
2.5.65-mm2 <8 16 24
2.5.65-mm2 deadline <8 20 28
*2.5.65-bk was still performing very well at dbench 56. I'll continue to test up to 128 clients.
2.5.65-bk was updated with a bk pull this morning.
Steven
Quoted 10 lines · Steven Cole
Quoted 3 lines · Andrew Morton
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
I am seeing a significant degradation of interactivity under load with recent -mm kernels. The load is dbench on a reiserfs file system with increasing numbers of clients. The test machine is single PIII, IDE, 256MB memory, all kernels PREEMPT.
(This email brought to you while running dbench 128 on ext3)
There's a pretty big reiserfs patch in -mm. Are you able to whip up an ext2 partition and see if that displays the same problem?
Quoted 12 lines · Andrew Morton
Quoted 10 lines · Steven Cole
Quoted 3 lines · Andrew Morton
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
I am seeing a significant degradation of interactivity under load with recent -mm kernels. The load is dbench on a reiserfs file system with increasing numbers of clients. The test machine is single PIII, IDE, 256MB memory, all kernels PREEMPT.
Quoted 5 lines
(This email brought to you while running dbench 128 on ext3)
There's a pretty big reiserfs patch in -mm. Are you able to whip up an ext2 partition and see if that displays the same problem?
I repeated the test on an ext3 partition, and the response with 28 dbench clients running is definitely better, although I'm starting to get some stalls of a couple seconds while typing this in Evolution on the machine under test. Now it's becoming intolerable, so I aborted the dbench run so I could finish this email.
This was with 2.5.65-mm2 and elevator=as. I'll repeat soon with elevator=deadline. I didn't try typing in Evolution with 2.5.65-bk under high loads, so I'll also give that a try.
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Steven
Quoted 25 lines · Steven P. Cole
Quoted 12 lines · Andrew Morton
Quoted 10 lines · Steven Cole
Quoted 3 lines · Andrew Morton
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/
I am seeing a significant degradation of interactivity under load with recent -mm kernels. The load is dbench on a reiserfs file system with increasing numbers of clients. The test machine is single PIII, IDE, 256MB memory, all kernels PREEMPT.
Quoted 5 lines
(This email brought to you while running dbench 128 on ext3)
There's a pretty big reiserfs patch in -mm. Are you able to whip up an ext2 partition and see if that displays the same problem?
I repeated the test on an ext3 partition, and the response with 28 dbench clients running is definitely better, although I'm starting to get some stalls of a couple seconds while typing this in Evolution on the machine under test. Now it's becoming intolerable, so I aborted the dbench run so I could finish this email.
Quoted 6 lines
This was with 2.5.65-mm2 and elevator=as. I'll repeat soon with elevator=deadline. I didn't try typing in Evolution with 2.5.65-bk under high loads, so I'll also give that a try.
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
I rebooted with 2.5.65-bk and ran dbench on ext3 again. Everything was going smoothly, excellent interactivity, and then with dbench 28, the system froze. No response to pings, no response to alt-sysrq-b (after alt-sysrq-s). A hard reset was required. Nothing interesting logged. Too bad. Before it crashed, 2.5.65-bk was responding to typing in an Evolution new message window better than -mm2.
I'll see if this is repeatable.
Steven
Quoted 6 lines · Steven P. Cole
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
Quoted 7 lines
I rebooted with 2.5.65-bk and ran dbench on ext3 again. Everything was going smoothly, excellent interactivity, and then with dbench 28, the system froze. No response to pings, no response to alt-sysrq-b (after alt-sysrq-s). A hard reset was required. Nothing interesting logged. Too bad. Before it crashed, 2.5.65-bk was responding to typing in an Evolution new message window better than -mm2.
Just out of curiosity, what is the result of:
cat /proc/sys/sched/max_timeslice?
Does setting that to e.g. 50 make -mm2 smooth?
Joe
Quoted 5 lines · Steven P. Cole
Quoted 4 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Quoted 7 lines
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-out/sched-2.5.64-D3.patch
help?
Quoted 16 lines · jjs
Quoted 6 lines · Steven P. Cole
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
Quoted 7 lines
I rebooted with 2.5.65-bk and ran dbench on ext3 again. Everything was going smoothly, excellent interactivity, and then with dbench 28, the system froze. No response to pings, no response to alt-sysrq-b (after alt-sysrq-s). A hard reset was required. Nothing interesting logged. Too bad. Before it crashed, 2.5.65-bk was responding to typing in an Evolution new message window better than -mm2.
Quoted 7 lines
Just out of curiosity, what is the result of:
cat
/proc/sys/sched/max_timeslice?Does setting that to e.g. 50 make -mm2 smooth?
Joe
[root@spc1 steven]# cat /proc/sys/sched/max_timeslice 200
[root@spc1 steven]# echo 50 >/proc/sys/sched/max_timeslice [root@spc1 steven]# cat /proc/sys/sched/max_timeslice 50
Ouch. I inserted the above text saved as a file, and had to wait over a minute after hitting the OK button. I aborted dbench which was running 24 clients on ext3 just to finish this.
The change in max_timeslice didn't seem to improve things.
Apart from the little matter of crashing, 2.5-bk was more usable at that and higher loads.
I'll try the different value of max_timeslice with dbench on reiserfs next. That's where the lack of response was most evident.
Steven
Quoted 2 lines · Steven P. Cole
I'll try the different value of
max_timeslicewith dbench on reiserfs next. That's where the lack of response was most evident.
I am curious as to whether reverting sched-D4 fixes this.
If not, the first step is seeing whether this is a bad decision made by the interactivity estimator. Something like:
ps -eo pid,nice,priority,command
for dbench, evolution, and X might be useful.
Thanks,
Robert Love
Steven P. Cole wrote
Quoted 10 lines
[root@spc1 steven]# cat
/proc/sys/sched/max_timeslice200
[root@spc1 steven]# echo 50 >/proc/sys/sched/max_timeslice [root@spc1 steven]# cat/proc/sys/sched/max_timeslice50Ouch. I inserted the above text saved as a file, and had to wait over a minute after hitting the OK button. I aborted dbench which was running 24 clients on ext3 just to finish this.
hmm, I'd always made this sort of change under somewhat quiescent conditions -
Interesting results though - it helped on my system in terms of desktop smoothness, i.e. visible stuttering of xterm motion when being dragged around the desktop during dbench -
Joe
Quoted 10 lines · Robert Love
Quoted 2 lines · Steven P. Cole
I'll try the different value of
max_timeslicewith dbench on reiserfs next. That's where the lack of response was most evident.I am curious as to whether reverting sched-D4 fixes this.
If not, the first step is seeing whether this is a bad decision made by the interactivity estimator. Something like:
Quoted 8 lines
ps -eo pid,nice,priority,command
for dbench, evolution, and X might be useful.
Thanks,
Robert Love
In the meantime, Andrew has asked me to revert the sched-D3 patch. I'm recompiling now, and will only have time for that test before I have to go do other things.
Steven
Quoted 14 lines · Andrew Morton
Quoted 5 lines · Steven P. Cole
Quoted 4 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Quoted 7 lines
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
Quoted 7 lines
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-out/sched-2.5.64-D3.patch
help?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Steven
Quoted 22 lines · Steven P. Cole
Quoted 21 lines · Andrew Morton
Quoted 11 lines · Steven P. Cole
Quoted 3 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-ou
t/sched-2.5.64-D3.patch
Quoted 7 lines
Quoted 1 line
help?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Steven,
Do things improve with the patch below applied? You have to backout the schedule-tuneables patch before appling it.
Ed Tomlinson
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1087 -> 1.1088
# include/linux/sched.h 1.137 -> 1.138
# kernel/fork.c 1.112 -> 1.113 # kernel/user.c 1.6 -> 1.7 # kernel/sched.c 1.163 -> 1.164
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/07 [email protected] 1.1088
# Add user and thread group governors to prevent either from monoplizing
# the system. The governors work by limiting the sum of the timeslices # of active tasks in a group to <n> timeslices. The defaults set <n> to # 1.5 for thread groups and to 10 for user tasks. # # For numa systems the governors are per node. Idealy the storage # should also be local to the node however, we do not have dynamic per # node storage yet... # -------------------------------------------- # diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Sat Mar 8 14:18:48 2003 +++ b/include/linux/sched.h Sat Mar 8 14:18:48 2003 @@ -178,6 +178,11 @@
#include <linux/aio.h>
+struct ptg_struct { /* pseudo thread groups */
+ atomic_t active[MAX_NUMNODES];
+ atomic_t count; /* number of refs */
+};
+
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
struct rb_root mm_rb;
@@ -278,6 +283,7 @@
struct user_struct {
atomic_t __count; /* reference count */
atomic_t processes; /* How many processes does this user have? */
+ atomic_t active[MAX_NUMNODES];
atomic_t files; /* How many open files does this user have? */
/* Hash table maintenance information */
@@ -344,6 +350,8 @@
struct list_head ptrace_list;
struct mm_struct *mm, *active_mm;
+ struct ptg_struct * ptgroup; /* pseudo thread group for this task */
+ atomic_t *governor; /* the atomic_t that governs this task */
/* task state */
struct linux_binfmt *binfmt;
kernel/fork.c +45 -0
@@ -96,12 +96,24 @@ } } +void free_ptgroup (struct task_struct *tsk) +{ +if (tsk->ptgroup &&atomic_sub_and_test (1 ,&tsk->ptgroup->count)) { +kfree (tsk->ptgroup); + tsk->ptgroup =NULL ; + tsk->governor = &tsk->user->active[cpu_to_node (task_cpu (tsk))]; +if (tsk == current) +atomic_inc (tsk->governor); + } +} +void __put_task_struct (struct task_struct *tsk) {WARN_ON (!(tsk->state & (TASK_DEAD |TASK_ZOMBIE )));WARN_ON (atomic_read (&tsk->usage));WARN_ON (tsk == current); +free_ptgroup (tsk);security_task_free (tsk);free_uid (tsk->user);free_task_struct (tsk);
@@ -469,6 +481,7 @@ tsk->mm =NULL ; tsk->active_mm =NULL ; + tsk->ptgroup =NULL ;/* * Are we cloning a kernel thread?
@@ -734,6 +747,32 @@ p->flags = new_flags; } +static inline int setup_governor (unsigned long clone_flags,struct task_struct *p) +{ +if ( ((clone_flags &CLONE_VM ) && (clone_flags &CLONE_FILES )) || + (clone_flags &CLONE_THREAD )) { +if (current->ptgroup) +atomic_inc (¤t->ptgroup->count); +else { +int i; + current->ptgroup =kmalloc (sizeof (struct ptg_struct ),GFP_ATOMIC ); +if (!current->ptgroup) +return 1 ; +/* printk(KERN_INFO "ptgroup - pid %u\n",current->pid); */ +atomic_set (¤t->ptgroup->count,2 ); +for (i=0 ; i <MAX_NUMNODES ; i++) +atomic_set (¤t->ptgroup->active[i],0 ); +atomic_set (¤t->ptgroup->active[numa_node_id ()],1 ); +atomic_dec (current->governor); + current->governor = ¤t->ptgroup->active[numa_node_id ()]; + } + p->ptgroup = current->ptgroup; + p->governor = &p->ptgroup->active[numa_node_id ()]; + }else + p->governor = &p->user->active[numa_node_id ()]; +return 0 ; +} + asmlinkage int sys_set_tid_address(int *tidptr) { current->clear_child_tid = tidptr;
@@ -876,6 +915,12 @@ goto bad_fork_cleanup_mm; retval =copy_thread (0 , clone_flags, stack_start, stack_size, p, regs);if (retval) + goto bad_fork_cleanup_namespace; +/* +* Setup the governor pointer for the new process, allocating a new ptg as +* required if the process is a thread. +*/ +if (setup_governor (clone_flags, p)) goto bad_fork_cleanup_namespace;if (clone_flags &CLONE_CHILD_SETTID )
kernel/sched.c +42 -10
115 lines not on this page · raw message
kernel/user.c +9 -0
@@ -30,6 +30,7 @@struct user_struct root_user = { .__count =ATOMIC_INIT (1 ), .processes =ATOMIC_INIT (1 ), + .active = {[0 ...MAX_NUMNODES -1 ] =ATOMIC_INIT (0 )}, .files =ATOMIC_INIT (0 ) };
@@ -89,6 +90,7 @@if (!up) {struct user_struct *new; +int i; new =kmem_cache_alloc (uid_cachep,SLAB_KERNEL );if (!new)
@@ -96,6 +98,8 @@ new->uid = uid;atomic_set (&new->__count,1 );atomic_set (&new->processes,0 ); +for (i=0 ; i <MAX_NUMNODES ; i++) +atomic_set (&new->active[i],0 );atomic_set (&new->files,0 );/*
@@ -130,6 +134,11 @@atomic_inc (&new_user->processes);atomic_dec (&old_user->processes); current->user = new_user; +if (!current->ptgroup) { +atomic_dec (current->governor); + current->governor = ¤t->user->active[numa_node_id ()]; +atomic_inc (current->governor); + }free_uid (old_user); }
Quoted 5 lines · Robert Love
Quoted 2 lines · Steven P. Cole
I'll try the different value of
max_timeslicewith dbench on reiserfs next. That's where the lack of response was most evident.
Quoted 8 lines
I am curious as to whether reverting sched-D4 fixes this.
If not, the first step is seeing whether this is a bad decision made by the interactivity estimator. Something like:
ps -eo pid,nice,priority,command
for dbench, evolution, and X might be useful.
I think I know what he'll see... elevated priority tasks doing round robin. Watch with top d1 showing only runnable tasks and you can see the starvation.
The problem as I see it is that when you have a number of tasks which become elevated to interactive status, they'll round robin and starve non-interactive tasks basically forever. This is also why my make -j30 bzImage introduces concurrency problems. Despite gcc being a cpu hog, when enough of them are running, those which have to wait for more time than they consume via cpu usage eventually achieve elevated status and round robin until they exit... throttling concurrency. Limiting the amount of boost that a task can gain via one activation helps this problem considerably, but does not eliminate it.
(think what happens to EXPIRED_STARVING when you have 30 hogs running, a few of them doing round robin, and the rest of them just _waiting_ for that queue switch to happen. :-/ ATM, I'm also gathering sleep time at schedule time [friendly tasks gain], so sleep_avg will never be consumed if you have more than one hog running. I made the starvation problem better for some loads, but utterly deadly for others.)
Something I'm going to try today (yesterday was educational if not wonderfully fruitful) is to limit the amount of time a piggy task can remain active in the hope of reducing the time interactive hogs can starve their expired brethren. I'm currently thinking forced expire after some number of switches * cpu_usage is reached might cure the starvation without destroying sleep_avg.
Suggestions very welcome. (fun problem:)
-Mike
Quoted 31 lines · Ed Tomlinson
Quoted 22 lines · Steven P. Cole
Quoted 21 lines · Andrew Morton
Quoted 11 lines · Steven P. Cole
Quoted 3 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-ou
t/sched-2.5.64-D3.patchQuoted 7 lines
Quoted 1 line
help?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Quoted 4 lines
Steven,
Do things improve with the patch below applied? You have to backout the schedule-tuneables patch before appling it.
I take it this is the one to back out?
scheduler-tunables.patch 17-Mar-2003 22:01 11k
Quoted 2 lines
Ed Tomlinson
I'll give it a shot when I get the chance. Unfortunately, I'm bogged down with meetings tomorrow morning, so it will be at least 14-15 hours from now. Perhaps some other adventurous person can pick up the ball in the meantime.
My test system is 933Mhz PIII, IDE, 256MB. The apps are Mozilla 1.3 and Evolution 1.2.2 running under KDE 3.1.
Thanks,
Steven
Quoted 31 lines · Ed Tomlinson
Quoted 22 lines · Steven P. Cole
Quoted 21 lines · Andrew Morton
Quoted 11 lines · Steven P. Cole
Quoted 3 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much to be desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject to long delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-ou
t/sched-2.5.64-D3.patchQuoted 7 lines
Quoted 1 line
help?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Quoted 6 lines
Steven,
Do things improve with the patch below applied? You have to backout the schedule-tuneables patch before appling it.
Ed Tomlinson
[patch snipped]
I tried that patch, and the bad behavior with the Evolution "Compose a Message" window remains. With a load of dbench 12, I had stalls of many seconds before I could type something. Also, here is an additional symptom. If I move the Evolution "Compose" window around rapidly, it leaves a smear of itself on the screen under itself. With all -mm2 variants, this smear stays for an intolerably long time (tens of seconds) while that window does not record keyboard strokes. 2.5.65-bk on the other hand exhibits much more benign behavior. Under similar load, the smear disappears in a few seconds and the window starts responding to keyboard events. I just now rebooted 2.5-bk to verify, and it is still responsive at dbench client loads which would make Evolution unusable with 2.5.65-mm2. Mozilla, on the other hand, still works OK under load with -mm2. This was all with dbench running on ext3.
I won't be able to do any more testing for several hours, so have fun!
Steven
Quoted 44 lines · Steven Cole
Quoted 5 lines · Ed Tomlinson
Quoted 4 lines · Steven P. Cole
Quoted 3 lines · Andrew Morton
Quoted 2 lines · Steven P. Cole
Quoted 2 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much
to be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject
to long
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-ou
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
t/sched-2.5.64-D3.patchhelp?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Quoted 6 lines
Steven,
Do things improve with the patch below applied? You have to backout the schedule-tuneables patch before appling it.
Ed Tomlinson
[patch snipped]
Quoted 8 lines
I tried that patch, and the bad behavior with the Evolution "Compose a Message" window remains. With a load of dbench 12, I had stalls of many seconds before I could type something. Also, here is an additional symptom. If I move the Evolution "Compose" window around rapidly, it leaves a smear of itself on the screen under itself. With all -mm2 variants, this smear stays for an intolerably long time (tens of seconds) while that window does not record keyboard strokes. 2.5.65-bk on the other hand exhibits much more benign behavior.
This is a side effect of Ingo's (nice!) latency change methinks. When you have several cpu hogs running (dbench), and they are cleaning your cpu's clock by using their full bandwidth to attain maximum throughput, and they then break up their timeslice in order to provide you with more responsiveness, and then their _cumulative_ sleep time between (round robin!) cpu hard burns is added to their sleep_avg, (boy is this a long sentence) you will (likely) find that they run at a highly elevated priority and starve the devil out of everything else because they can not possibly get enough cpu to eat the sleep_avg they have been given (only way to reduce their priority without forking). Virgin .65 is also subject to the positive feedback loop (irman's process load is worst case methinks, and rounding down only ~hides it).
I have a really horrid looking sched.c right now that works around some of this problem in disgusting ways. If you want to try it, give me a holler before tomorrow morning (slice 'n dice resumes) and I'll rip it out and send it to you. Fair warning though, if you have good taste, don't look at it at all before applying. There are a few of spots I wouldn't even want to _try_ to justify. I don't think dbench will be able to dork it up, but irman's process load (horrible thing) now can again. (it's pure research... that says a lot;)
Bottom line is that once cpu hogs are falsely determined to be sleepers, positive feedback kills you.
-Mike
Quoted 76 lines · Mike Galbraith
Quoted 44 lines · Steven Cole
Quoted 5 lines · Ed Tomlinson
Quoted 4 lines · Steven P. Cole
Quoted 3 lines · Andrew Morton
Quoted 2 lines · Steven P. Cole
Quoted 2 lines
Summary: using ext3, the simple window shake and scrollbar wiggle tests were much improved, but really using Evolution left much
to be
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
desired.
Replying to myself for a followup,
I repeated the tests with 2.5.65-mm2 elevator=deadline and the situation was similar to elevator=as. Running dbench on ext3, the response to desktop switches and window wiggles was improved over running dbench on reiserfs, but typing in Evolution was subject
to long
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
delays with dbench clients greater than 16.
OK, final question before I get off my butt and find a way to reproduce this:
Does reverting
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.65/2.5.65-mm2/broken-ou
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
t/sched-2.5.64-D3.patchhelp?
Sorry, didn't have much time for a lot of testing, but no miracles occurred. With 5 minutes of testing 2.5.65-mm2 and dbench 24 on ext3 and that patch reverted (first hunk had to be manually fixed), I don't see any improvement. Still the same long long delays in trying to use Evolution.
Quoted 6 lines
Steven,
Do things improve with the patch below applied? You have to backout the schedule-tuneables patch before appling it.
Ed Tomlinson
[patch snipped]
Quoted 8 lines
I tried that patch, and the bad behavior with the Evolution "Compose a Message" window remains. With a load of dbench 12, I had stalls of many seconds before I could type something. Also, here is an additional symptom. If I move the Evolution "Compose" window around rapidly, it leaves a smear of itself on the screen under itself. With all -mm2 variants, this smear stays for an intolerably long time (tens of seconds) while that window does not record keyboard strokes. 2.5.65-bk on the other hand exhibits much more benign behavior.
This is a side effect of Ingo's (nice!) latency change methinks. When you have several cpu hogs running (dbench), and they are cleaning your cpu's clock by using their full bandwidth to attain maximum throughput, and they then break up their timeslice in order to provide you with more responsiveness, and then their _cumulative_ sleep time between (round robin!) cpu hard burns is added to their
sleep_avg, (boy is this a long sentence) you will (likely) find that they run at a highly elevated priority and starve the devil out of everything else because they can not possibly get enough cpu to eat thesleep_avgthey have been given (only way to reduce their priority without forking). Virgin .65 is also subject to the positive feedback loop (irman's process load is worst case methinks, and rounding down only ~hides it).I have a really horrid looking
sched.cright now that works around some of this problem in disgusting ways. If you want to try it, give me a holler before tomorrow morning (slice 'n dice resumes) and I'll rip it out and send it to you. Fair warning though, if you have good taste, don't look at it at all before applying. There are a few of spots I wouldn't even want to _try_ to justify. I don't think dbench will be able to dork it up, but irman's process load (horrible thing) now can again. (it's pure research... that says a lot;)
Quoted 6 lines
Bottom line is that once cpu hogs are falsely determined to be sleepers, positive feedback kills you.
-Mike
Sure, either post a patch against a known sync point, .65, .65-bk, or 65-mm2, or send me the sched.c file itself (2600 lines might be a little too much for the entire list).
If you send it in the next 2 hours, I can test today, otherwise I'll do it mañana.
Steven
Quoted 8 lines · Steven P. Cole
Quoted 7 lines · Mike Galbraith
At 07:36 AM 3/20/2003 -0700, Steven Cole wrote:
Bottom line is that once cpu hogs are falsely determined to be sleepers, positive feedback kills you.-Mike
Quoted 6 lines
Sure, either post a patch against a known sync point, .65, .65-bk, or 65-mm2, or send me the
sched.cfile itself (2600 lines might be a little too much for the entire list).If you send it in the next 2 hours, I can test today, otherwise I'll do it mañana.
What the heck. It is attached.
-Mike
(and I repeat, don't _look_, just run it, and let me know;)
include/linux/sched.h +2 -1
@@ -328,7 +328,8 @@prio_array_t *array;unsigned long sleep_avg; -unsigned long last_run; +unsigned long sleep_begin; +unsigned long sleep_end;unsigned long policy;unsigned long cpus_allowed;
kernel/fork.c +1 -1
@@ -918,7 +918,7 @@*/ p->first_time_slice =1 ; current->time_slice >>=1 ; - p->last_run = jiffies; + p->sleep_begin = p->sleep_end = jiffies;if (!current->time_slice) {/* * This case is rare, it happens when the parent has only
kernel/printk.c +2 -0
@@ -510,8 +510,10 @@ console_may_schedule =0 ;up (&console_sem);spin_unlock_irqrestore (&logbuf_lock, flags); +#if 0 // MIKEDIDIT if (wake_klogd && !oops_in_progress &&waitqueue_active (&log_wait))wake_up_interruptible (&log_wait); +#endif }/** console_conditional_schedule - yield the CPU if required
kernel/sched.c +63 -56
200 lines not on this page · raw message
Quoted 13 lines · Mike Galbraith
Quoted 12 lines · Steven P. Cole
Quoted 7 lines · Mike Galbraith
At 07:36 AM 3/20/2003 -0700, Steven Cole wrote:
Bottom line is that once cpu hogs are falsely determined to be sleepers, positive feedback kills you.-Mike
Sure, either post a patch against a known sync point, .65, .65-bk, or 65-mm2, or send me the
sched.cfile itself (2600 lines might be a little too much for the entire list).
Quoted 8 lines
Quoted 2 lines
If you send it in the next 2 hours, I can test today, otherwise I'll do it mañana.
What the heck. It is attached.
-Mike
(and I repeat, don't _look_, just run it, and let me know;)
[steven@spc1 linux-2.5.65-mg]$ patch -p1 <../../xx.diff patching file include/linux/sched.h
patching file kernel/fork.c
patching file kernel/printk.c
patching file kernel/sched.c
patch: **** unexpected end of file in patch
It looks like the last hunk has no trailing context lines. Did your patch get clobbered?
Steven
Quoted 9 lines · Steven P. Cole
[steven@spc1 linux-2.5.65-mg]$ patch -p1 <
../../xx.diffpatching fileinclude/linux/sched.h
patching filekernel/fork.c
patching filekernel/printk.c
patching filekernel/sched.c
patch: **** unexpected end of file in patchIt looks like the last hunk has no trailing context lines. Did your patch get clobbered?
Must have. One more time.
-Mike
include/linux/sched.h +2 -1
@@ -328,7 +328,8 @@prio_array_t *array;unsigned long sleep_avg; -unsigned long last_run; +unsigned long sleep_begin; +unsigned long sleep_end;unsigned long policy;unsigned long cpus_allowed;
kernel/fork.c +1 -1
@@ -918,7 +918,7 @@*/ p->first_time_slice =1 ; current->time_slice >>=1 ; - p->last_run = jiffies; + p->sleep_begin = p->sleep_end = jiffies;if (!current->time_slice) {/* * This case is rare, it happens when the parent has only
kernel/printk.c +2 -0
@@ -510,8 +510,10 @@ console_may_schedule =0 ;up (&console_sem);spin_unlock_irqrestore (&logbuf_lock, flags); +#if 0 // MIKEDIDIT if (wake_klogd && !oops_in_progress &&waitqueue_active (&log_wait))wake_up_interruptible (&log_wait); +#endif }/** console_conditional_schedule - yield the CPU if required
kernel/sched.c +83 -56
223 lines not on this page · raw message
Quoted 6 lines · Mike Galbraith
This is a side effect of Ingo's (nice!) latency change methinks. When you have several cpu hogs running (dbench), and they are cleaning your cpu's clock by using their full bandwidth to attain maximum throughput, and they then break up their timeslice in order to provide you with more responsiveness, and then their _cumulative_ sleep time between (round robin!) cpu hard burns is added to their
sleep_avg, [...]
actually, the round-robining for finer-grained timeslices should not impact the sleep average at all, because the roundrobin is done while the task is still _running_, ie. the sleep average does not get impacted. Otherwise we'd have elevated priority of simple CPU-intensive applications, which would be Bad.
The way the sleep-average is maintained is balanced very carefully in the O(1) scheduler. There are three states a task can be in:
- sleeping: the sleep average increases
- running but not executing: the sleep average stagnates
- executing on a CPU: the sleep average decreases
ie. in the roundrobin case the tasks will neither increase, nor decrease their sleep average - they are in essence 'frozen'. The moment they get scheduled on a CPU for execution, their sleep average starts to decrease again. (and once they go to sleep, their sleep average increases.)
so whatever effect you are seeing, it must be something else.
Ingo
Quoted 2 lines · Mike Galbraith
[...] Virgin .65 is also subject to the positive feedback loop (irman's process load is worst case methinks, and rounding down only ~hides it).
there's no positive feedback loop. What might happen is that in 2.5.65 we now distribute the bonus timeslices more widely (the backboost thing), so certain workloads might be rated more interactive. But we never give away timeslices that were not earned the hard way (ie. via actual sleeping).
i've attached a patch that temporarily turns off the back-boost - does that have any measurable impact? [please apply this to -mm1, i do think the timeslice-granularity change in -mm1 (-D3) is something we really want.]
Ingo
sched.c renamed from sched.c.orig +1 -1
@@ -365,7 +365,7 @@* tasks. */ if (sleep_avg >MAX_SLEEP_AVG ) { -if (!in_interrupt ()) { +if (0 && !in_interrupt ()) { sleep_avg += current->sleep_avg -MAX_SLEEP_AVG ;if (sleep_avg >MAX_SLEEP_AVG ) sleep_avg =MAX_SLEEP_AVG ;
Quoted 9 lines · Ingo Molnar
Quoted 2 lines · Mike Galbraith
[...] Virgin .65 is also subject to the positive feedback loop (irman's process load is worst case methinks, and rounding down only ~hides it).
there's no positive feedback loop. What might happen is that in 2.5.65 we now distribute the bonus timeslices more widely (the backboost thing), so certain workloads might be rated more interactive. But we never give away timeslices that were not earned the hard way (ie. via actual sleeping).
(backboost alone is not it, nor is it timeslice granularity alone... bleh)
Quoted 4 lines
i've attached a patch that temporarily turns off the back-boost - does that have any measurable impact? [please apply this to -mm1, i do think the timeslice-granularity change in -mm1 (-D3) is something we really want.]
I still don't have anything worth discussing.
-Mike
(however, I have been fiddling with the dang thing rather frenetically;)
Yes, this makes a difference. (everything in sched makes a difference) The basic problem I'm seeing is load detection, and recovery from erroneous detection. When it goes wrong, recovery isn't happening here. cc1 should not ever be called anything but a cpu hog, but I've see it and others running at prio 16 (deadly). This is nice if you're doing deadline scheduling, and boost cc1 because it's late, ie intentionally, to boost it's throughput. What I believe happens is that various cpu hogs get miss-identified, and get boost with no way other than to fork (parent_penalty [100%atm]) or use more cpu than exists. (I think) This I call positive feedback. The irman process loop is really ugly, and the scheduler totally fails to deal with it. Disabling forward boost actually does serious harm to this load. The best thing you can do for this load with the scheduler is to run it at nice 19. You can get a worst case latency of 50ms without much if any tinkering. (no stockish kernel does better than 600ms _ever_ on an otherwise totally idle 500Mhz box here. ~200ms worst case is the _best_ I've gotten by playing with this and that priority wise)
There may be something really simple behind the concurrency problems I see here. (bottom line for me is the concurrency problem... I want to understand it. The rest is less than the crux of the biscuit.
(generally, concurrency is much improved, and believe it or not, that's exactly what is bugging me so. Too much is too little is too much. I'm not ready to give up yet.
-Mike