[PATCH] [PATCH]Fixed: line break of pr_cont not take effect in linux-rt
From: 汪勇10269566 Line break of pr_cont not take effect. Use several pr_cont to print continuous paragraph, it is expected to have line break when line ends up with '\n', however the paragraph does not have line break -printk_kthread_func will not print info before log_store insert msg into printk_rb, and pr_cont calls cont_add to keep data in buffer. cont_add only when the following conditions are met insert msg to printk_rb 1.cpu != c->cpu_owner || !(flags & LOG_CONT) 2.c->len + len > sizeof(c->buf) Signed-off-by: 汪勇10269566 --- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 0605a74..d898f50 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1871,6 +1871,7 @@ static void cont_add(int ctx, int cpu, u32 caller_id, int facility, int level, // but later continuations can add a newline. if (flags & LOG_NEWLINE) { c->flags |= LOG_NEWLINE; + cont_flush(ctx); } } -- 2.15.2
[PATCH 3/3] x86/mm, tracing: Fix CR2 corruption
Despire the current efforts to read CR2 before tracing happens there still exist a number of possible holes: idtentry page_fault do_page_fault has_error_code=1 call error_entry TRACE_IRQS_OFF call trace_hardirqs_off* #PF // modifies CR2 CALL_enter_from_user_mode __context_tracking_exit() trace_user_exit(0) #PF // modifies CR2 call do_page_fault address = read_cr2(); /* whoopsie */ And similar for i386. Fix it by pulling the CR2 read into the entry code, before any of that stuff gets a chance to run and ruin things. Ideally we'll clean up the entry code by moving this tracing and context tracking nonsense into C some day, but let's not delay fixing this longer. Reported-by: He Zhe Reported-by: Eiichi Tsukata Debugged-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_32.S | 25 ++--- arch/x86/entry/entry_64.S | 28 ++-- arch/x86/include/asm/kvm_para.h |2 +- arch/x86/include/asm/traps.h|2 +- arch/x86/kernel/kvm.c |8 arch/x86/mm/fault.c | 28 ++-- 6 files changed, 52 insertions(+), 41 deletions(-) --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -1443,9 +1443,28 @@ BUILD_INTERRUPT3(hv_stimer0_callback_vec ENTRY(page_fault) ASM_CLAC - pushl $do_page_fault - ALIGN - jmp common_exception + pushl $0; /* %gs's slot on the stack */ + + SAVE_ALL switch_stacks=1 skip_gs=1 + + ENCODE_FRAME_POINTER + UNWIND_ESPFIX_STACK + + /* fixup %gs */ + GS_TO_REG %ecx + REG_TO_PTGS %ecx + SET_KERNEL_GS %ecx + + GET_CR2_INTO(%ecx) # might clobber %eax + + /* fixup orig %eax */ + movlPT_ORIG_EAX(%esp), %edx # get the error code + movl$-1, PT_ORIG_EAX(%esp) # no syscall to restart + + TRACE_IRQS_OFF + movl%esp, %eax # pt_regs pointer + calldo_page_fault + jmp ret_from_exception END(page_fault) common_exception: --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -901,7 +901,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work * @paranoid == 2 is special: the stub will never switch stacks. This is for * #DF: if the thread stack is somehow unusable, we'll still get a useful OOPS. */ -.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 ist_offset=0 create_gap=0 +.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 ist_offset=0 create_gap=0 read_cr2=0 ENTRY(\sym) UNWIND_HINT_IRET_REGS offset=\has_error_code*8 @@ -937,18 +937,27 @@ ENTRY(\sym) .if \paranoid callparanoid_entry + /* returned flag: ebx=0: need swapgs on exit, ebx=1: don't need it */ .else callerror_entry .endif UNWIND_HINT_REGS - /* returned flag: ebx=0: need swapgs on exit, ebx=1: don't need it */ - .if \paranoid + .if \read_cr2 + GET_CR2_INTO(%rdx); /* can clobber %rax */ + .endif + .if \shift_ist != -1 TRACE_IRQS_OFF_DEBUG/* reload IDT in case of recursion */ .else TRACE_IRQS_OFF .endif + + .if \paranoid == 0 + testb $3, CS(%rsp) + jz .Lfrom_kernel_no_context_tracking_\@ + CALL_enter_from_user_mode +.Lfrom_kernel_no_context_tracking_\@: .endif movq%rsp, %rdi /* pt_regs pointer */ @@ -1180,10 +1189,10 @@ idtentry xenint3do_int3 has_error_co #endif idtentry general_protectiondo_general_protection has_error_code=1 -idtentry page_faultdo_page_fault has_error_code=1 +idtentry page_faultdo_page_fault has_error_code=1 read_cr2=1 #ifdef CONFIG_KVM_GUEST -idtentry async_page_fault do_async_page_fault has_error_code=1 +idtentry async_page_fault do_async_page_fault has_error_code=1 read_cr2=1 #endif #ifdef CONFIG_X86_MCE @@ -1338,18 +1347,9 @@ ENTRY(error_entry) movq%rax, %rsp /* switch stack */ ENCODE_FRAME_POINTER pushq %r12 - - /* -* We need to tell lockdep that IRQs are off. We can't do this until -* we fix gsbase, and we should do it before enter_from_user_mode -* (which can take locks). -*/ - TRACE_IRQS_OFF - CALL_enter_from_user_mode ret .Lerror_entry_done: - TRACE_IRQS_OFF ret /* --- a/arch/x86/include/asm/kvm_para.h +++ b/arch/x86/include/asm/kvm_para.h @@ -92,7 +92,7 @@ void kvm_async_pf_task_wait(u32 token, i void kvm_async_pf_task_wake(u32 token); u32 kvm_read_and_reset_pf_reason(voi
[PATCH 0/3] tracing vs CR2
Hi, Eiichi-san re-discovered the bug earlier found by He Zhe which we've failed to fix due to getting distracted by discussing how to untangle entry_64.S. These 3 patches are basically a completion of the initial approach I suggested in that earlier thread: https://lkml.kernel.org/r/20190320221534.165ab...@oasis.local.home Yes, idtentry is a mess, and this doesn't help, but lets fix this now before someone else trips over it. This boots on x86_64 and builds on i386 so it must be perfect. No Xen testing what so ever, because I wouldn't know where to begin.
[PATCH 1/3] x86/paravirt: Make read_cr2() CALLEE_SAVE
The one paravirt read_cr2() implementation (Xen) is actually quite trivial and doesn't need to clobber anything other than the return register. By making read_cr2() CALLEE_SAVE we avoid all the PUSH/POP nonsense and allow more convenient use from assembly. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/calling.h |6 ++ arch/x86/include/asm/paravirt.h | 22 +- arch/x86/include/asm/paravirt_types.h |2 +- arch/x86/kernel/asm-offsets.c |1 + arch/x86/kernel/head_64.S |4 +--- arch/x86/kernel/paravirt.c|2 +- arch/x86/xen/enlighten_pv.c |3 ++- arch/x86/xen/mmu_pv.c | 12 +--- arch/x86/xen/xen-asm.S| 17 + arch/x86/xen/xen-ops.h|3 +++ 10 files changed, 46 insertions(+), 26 deletions(-) --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -383,3 +383,9 @@ For 32-bit we have the following convent .Lafter_call_\@: #endif .endm + +#ifdef CONFIG_PARAVIRT_XXL +#define GET_CR2_INTO(reg) GET_CR2_INTO_AX ; _ASM_MOV %_ASM_AX, reg +#else +#define GET_CR2_INTO(reg) _ASM_MOV %cr2, reg +#endif --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -116,7 +116,7 @@ static inline void write_cr0(unsigned lo static inline unsigned long read_cr2(void) { - return PVOP_CALL0(unsigned long, mmu.read_cr2); + return PVOP_CALLEE0(unsigned long, mmu.read_cr2); } static inline void write_cr2(unsigned long x) @@ -909,13 +909,7 @@ extern void default_banner(void); ANNOTATE_RETPOLINE_SAFE; \ call PARA_INDIRECT(pv_ops+PV_CPU_swapgs); \ ) -#endif - -#define GET_CR2_INTO_RAX \ - ANNOTATE_RETPOLINE_SAFE;\ - call PARA_INDIRECT(pv_ops+PV_MMU_read_cr2); -#ifdef CONFIG_PARAVIRT_XXL #define USERGS_SYSRET64 \ PARA_SITE(PARA_PATCH(PV_CPU_usergs_sysret64), \ ANNOTATE_RETPOLINE_SAFE; \ @@ -929,9 +923,19 @@ extern void default_banner(void); call PARA_INDIRECT(pv_ops+PV_IRQ_save_fl);\ PV_RESTORE_REGS(clobbers | CLBR_CALLEE_SAVE);) #endif -#endif +#endif /* CONFIG_PARAVIRT_XXL */ +#endif /* CONFIG_X86_64 */ + +#ifdef CONFIG_PARAVIRT_XXL + +#define GET_CR2_INTO_AX \ + PARA_SITE(PARA_PATCH(PV_MMU_read_cr2), \ + ANNOTATE_RETPOLINE_SAFE; \ + call PARA_INDIRECT(pv_ops+PV_MMU_read_cr2); \ +) + +#endif /* CONFIG_PARAVIRT_XXL */ -#endif /* CONFIG_X86_32 */ #endif /* __ASSEMBLY__ */ #else /* CONFIG_PARAVIRT */ --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -220,7 +220,7 @@ struct pv_mmu_ops { void (*exit_mmap)(struct mm_struct *mm); #ifdef CONFIG_PARAVIRT_XXL - unsigned long (*read_cr2)(void); + struct paravirt_callee_save read_cr2; void (*write_cr2)(unsigned long); unsigned long (*read_cr3)(void); --- a/arch/x86/kernel/asm-offsets.c +++ b/arch/x86/kernel/asm-offsets.c @@ -76,6 +76,7 @@ static void __used common(void) BLANK(); OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask); OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending); + OFFSET(XEN_vcpu_info_arch_cr2, vcpu_info, arch.cr2); #endif BLANK(); --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -29,9 +29,7 @@ #ifdef CONFIG_PARAVIRT_XXL #include #include -#define GET_CR2_INTO(reg) GET_CR2_INTO_RAX ; movq %rax, reg #else -#define GET_CR2_INTO(reg) movq %cr2, reg #define INTERRUPT_RETURN iretq #endif @@ -323,7 +321,7 @@ END(early_idt_handler_array) cmpq $14,%rsi /* Page fault? */ jnz 10f - GET_CR2_INTO(%rdi) /* Can clobber any volatile register if pv */ + GET_CR2_INTO(%rdi) /* can clobber %rax if pv */ call early_make_pgtable andl %eax,%eax jz 20f /* All good */ --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -370,7 +370,7 @@ struct paravirt_patch_template pv_ops = .mmu.exit_mmap = paravirt_nop, #ifdef CONFIG_PARAVIRT_XXL - .mmu.read_cr2 = native_read_cr2, + .mmu.read_cr2 = __PV_IS_CALLEE_SAVE(native_read_cr2), .mmu.write_cr2 = native_write_cr2, .mmu.read_cr3 = __native_read_cr3, .mmu.write_cr3 = native_write_cr3, --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -998,7 +998,8 @@ void __init xen_setup_vcpu_info_placemen
[PATCH 2/3] x86/entry/32: Simplify common_exception
By adding one more option to SAVE_ALL we can make use of it in common_exception and simplify things. This saves duplication later where page_fault will no longer use common_exception. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_32.S | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -294,9 +294,11 @@ .Lfinished_frame_\@: .endm -.macro SAVE_ALL pt_regs_ax=%eax switch_stacks=0 +.macro SAVE_ALL pt_regs_ax=%eax switch_stacks=0 skip_gs=0 cld +.if \skip_gs == 0 PUSH_GS +.endif FIXUP_FRAME pushl %fs pushl %es @@ -313,13 +315,13 @@ movl%edx, %es movl$(__KERNEL_PERCPU), %edx movl%edx, %fs +.if \skip_gs == 0 SET_KERNEL_GS %edx - +.endif /* Switch to kernel stack if necessary */ .if \switch_stacks > 0 SWITCH_TO_KERNEL_STACK .endif - .endm .macro SAVE_ALL_NMI cr3_reg:req @@ -1448,32 +1450,20 @@ END(page_fault) common_exception: /* the function address is in %gs's slot on the stack */ - FIXUP_FRAME - pushl %fs - pushl %es - pushl %ds - pushl %eax - movl$(__USER_DS), %eax - movl%eax, %ds - movl%eax, %es - movl$(__KERNEL_PERCPU), %eax - movl%eax, %fs - pushl %ebp - pushl %edi - pushl %esi - pushl %edx - pushl %ecx - pushl %ebx - SWITCH_TO_KERNEL_STACK + SAVE_ALL switch_stacks=1 skip_gs=1 ENCODE_FRAME_POINTER - cld UNWIND_ESPFIX_STACK + + /* fixup %gs */ GS_TO_REG %ecx movlPT_GS(%esp), %edi # get the function address - movlPT_ORIG_EAX(%esp), %edx # get the error code - movl$-1, PT_ORIG_EAX(%esp) # no syscall to restart REG_TO_PTGS %ecx SET_KERNEL_GS %ecx + + /* fixup orig %eax */ + movlPT_ORIG_EAX(%esp), %edx # get the error code + movl$-1, PT_ORIG_EAX(%esp) # no syscall to restart + TRACE_IRQS_OFF movl%esp, %eax # pt_regs pointer CALL_NOSPEC %edi
[PATCH] staging: comedi: Removed not necessary braces for single block
This patch is used to remove not necessary braces for single if block. Signed-off-by: Jitendra Kumar Khasdev --- drivers/staging/comedi/comedi_fops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 5d2fcbfe02af..0caae4a5c471 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1605,9 +1605,8 @@ static int do_insn_ioctl(struct comedi_device *dev, unsigned int n_data = MIN_SAMPLES; int ret = 0; - if (copy_from_user(&insn, arg, sizeof(insn))) { + if (copy_from_user(&insn, arg, sizeof(insn))) return -EFAULT; - } n_data = max(n_data, insn.n); -- 2.13.6
[PATCH 0/2] x86/idle: add halt poll support
From: Yang Zhang Some latency-intensive workload will see obviously performance drop when running inside VM. The main reason is that the overhead is amplified when running inside VM. The most cost i have seen is inside idle path. This patch introduces a new mechanism to poll for a while before entering idle state. If schedule is needed during poll, then we don't need to goes through the heavy overhead path. Here is the data i get when running benchmark contextswitch (https://github.com/tsuna/contextswitch) before patch: 200 process context switches in 4822613801ns (2411.3ns/ctxsw) after patch: 200 process context switches in 3584098241ns (1792.0ns/ctxsw) Yang Zhang (2): x86/idle: add halt poll for halt idle x86/idle: use dynamic halt poll Documentation/sysctl/kernel.txt | 24 ++ arch/x86/include/asm/processor.h | 6 +++ arch/x86/kernel/apic/apic.c | 6 +++ arch/x86/kernel/apic/vector.c| 1 + arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 + arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 + arch/x86/kernel/cpu/mcheck/threshold.c | 2 + arch/x86/kernel/irq.c| 5 ++ arch/x86/kernel/irq_work.c | 2 + arch/x86/kernel/process.c| 80 arch/x86/kernel/smp.c| 6 +++ include/linux/kernel.h | 5 ++ kernel/sched/idle.c | 3 ++ kernel/sysctl.c | 23 + 14 files changed, 167 insertions(+) -- 1.8.3.1
[PATCH 1/2] x86/idle: add halt poll for halt idle
From: Yang Zhang This patch introduce a new mechanism to poll for a while before entering idle state. David has a topic in KVM forum to describe the problem on current KVM VM when running some message passing workload in KVM forum. Also, there are some work to improve the performance in KVM, like halt polling in KVM. But we still has 4 MSR wirtes and HLT vmexit when going into halt idle which introduce lot of latency. Halt polling in KVM provide the capbility to not schedule out VCPU when it is the only task in this pCPU. Unlike it, this patch will let VCPU polls for a while if there is no work inside VCPU to elimiate heavy vmexit during in/out idle. The potential impact is it will cost more CPU cycle since we are doing polling and may impact other task which waiting on the same physical CPU in host. Here is the data i get when running benchmark contextswitch (https://github.com/tsuna/contextswitch) before patch: 200 process context switches in 4822613801ns (2411.3ns/ctxsw) after patch: 200 process context switches in 3584098241ns (1792.0ns/ctxsw) Signed-off-by: Yang Zhang --- Documentation/sysctl/kernel.txt | 10 ++ arch/x86/kernel/process.c | 21 + include/linux/kernel.h | 3 +++ kernel/sched/idle.c | 3 +++ kernel/sysctl.c | 9 + 5 files changed, 46 insertions(+) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index bac23c1..4e71bfe 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -63,6 +63,7 @@ show up in /proc/sys/kernel: - perf_event_max_stack - perf_event_max_contexts_per_stack - pid_max +- poll_threshold_ns[ X86 only ] - powersave-nap [ PPC only ] - printk - printk_delay @@ -702,6 +703,15 @@ kernel tries to allocate a number starting from this one. == +poll_threshold_ns: (X86 only) + +This parameter used to control the max wait time to poll before going +into real idle state. By default, the values is 0 means don't poll. +It is recommended to change the value to non-zero if running latency-bound +workloads in VM. + +== + powersave-nap: (PPC only) If set, Linux-PPC will use the 'nap' mode of powersaving, diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 0bb8842..6361783 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -39,6 +39,10 @@ #include #include +#ifdef CONFIG_HYPERVISOR_GUEST +unsigned long poll_threshold_ns; +#endif + /* * per-CPU TSS segments. Threads are completely 'soft' on Linux, * no more per-task TSS's. The TSS size is kept cacheline-aligned @@ -313,6 +317,23 @@ static inline void play_dead(void) } #endif +#ifdef CONFIG_HYPERVISOR_GUEST +void arch_cpu_idle_poll(void) +{ + ktime_t start, cur, stop; + + if (poll_threshold_ns) { + start = cur = ktime_get(); + stop = ktime_add_ns(ktime_get(), poll_threshold_ns); + do { + if (need_resched()) + break; + cur = ktime_get(); + } while (ktime_before(cur, stop)); + } +} +#endif + void arch_cpu_idle_enter(void) { tsc_verify_tsc_adjust(false); diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 13bc08a..04cf774 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -460,6 +460,9 @@ extern __scanf(2, 0) extern int sysctl_panic_on_stackoverflow; extern bool crash_kexec_post_notifiers; +#ifdef CONFIG_HYPERVISOR_GUEST +extern unsigned long poll_threshold_ns; +#endif /* * panic_cpu is used for synchronizing panic() and crash_kexec() execution. It diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 2a25a9e..e789f99 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -74,6 +74,7 @@ static noinline int __cpuidle cpu_idle_poll(void) } /* Weak implementations for optional arch specific functions */ +void __weak arch_cpu_idle_poll(void) { } void __weak arch_cpu_idle_prepare(void) { } void __weak arch_cpu_idle_enter(void) { } void __weak arch_cpu_idle_exit(void) { } @@ -219,6 +220,8 @@ static void do_idle(void) */ __current_set_polling(); + arch_cpu_idle_poll(); + tick_nohz_idle_enter(); while (!need_resched()) { diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 4dfba1a..9174d57 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1203,6 +1203,15 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write, .extra2 = &one, }, #endif +#ifdef CONFIG_HYPERVISOR_GUEST + { + .procname = "halt_poll_threshold", + .data = &poll_threshold_ns, + .maxlen = sizeof(unsigned long), + .mode =
[PATCH 2/2] x86/idle: use dynamic halt poll
From: Yang Zhang use dynamic poll to reduce the cost when the event is not occurred during poll. The idea is similar to current dynamic halt poll inside KVM: Before entering idle, we will record the time. After wakeup from idle (nomally, this is in interrupt handler), we will record the time too. Then we will check whether we need to grow/shrink the poll time depands on how long the CPU stay inside idle state. There are two new sysctl to change poll time dynamically: poll_shrink, poll_grow Signed-off-by: Yang Zhang --- Documentation/sysctl/kernel.txt | 14 arch/x86/include/asm/processor.h | 6 arch/x86/kernel/apic/apic.c | 6 arch/x86/kernel/apic/vector.c| 1 + arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 ++ arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 ++ arch/x86/kernel/cpu/mcheck/threshold.c | 2 ++ arch/x86/kernel/irq.c| 5 +++ arch/x86/kernel/irq_work.c | 2 ++ arch/x86/kernel/process.c| 59 arch/x86/kernel/smp.c| 6 include/linux/kernel.h | 2 ++ kernel/sysctl.c | 14 13 files changed, 121 insertions(+) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 4e71bfe..76043b4 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -63,6 +63,8 @@ show up in /proc/sys/kernel: - perf_event_max_stack - perf_event_max_contexts_per_stack - pid_max +- poll_grow[ X86 only ] +- poll_shrink [ X86 only ] - poll_threshold_ns[ X86 only ] - powersave-nap [ PPC only ] - printk @@ -703,6 +705,18 @@ kernel tries to allocate a number starting from this one. == +poll_grow: (X86 only) + +This parameter is multiplied in the grow_poll_ns() to increase the poll time. +By default, the values is 2. + +== +poll_shrink: (X86 only) + +This parameter is divided in the shrink_poll_ns() to reduce the poll time. +By default, the values is 2. + +== poll_threshold_ns: (X86 only) This parameter used to control the max wait time to poll before going diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 3cada99..cf952ed 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -931,4 +931,10 @@ static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves) void stop_this_cpu(void *dummy); void df_debug(struct pt_regs *regs, long error_code); +#ifdef CONFIG_HYPERVISOR_GUEST +extern void check_poll(void); +#else +static inline void check_poll(void) {} +#endif + #endif /* _ASM_X86_PROCESSOR_H */ diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 2d75faf..37b16b6 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -962,6 +962,7 @@ __visible void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) * interrupt lock, which is the WrongThing (tm) to do. */ entering_ack_irq(); + check_poll(); local_apic_timer_interrupt(); exiting_irq(); @@ -981,6 +982,7 @@ __visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs) * interrupt lock, which is the WrongThing (tm) to do. */ entering_ack_irq(); + check_poll(); trace_local_timer_entry(LOCAL_TIMER_VECTOR); local_apic_timer_interrupt(); trace_local_timer_exit(LOCAL_TIMER_VECTOR); @@ -1863,6 +1865,7 @@ static void __smp_spurious_interrupt(u8 vector) __visible void __irq_entry smp_spurious_interrupt(struct pt_regs *regs) { entering_irq(); + check_poll(); __smp_spurious_interrupt(~regs->orig_ax); exiting_irq(); } @@ -1872,6 +1875,7 @@ __visible void __irq_entry smp_trace_spurious_interrupt(struct pt_regs *regs) u8 vector = ~regs->orig_ax; entering_irq(); + check_poll(); trace_spurious_apic_entry(vector); __smp_spurious_interrupt(vector); trace_spurious_apic_exit(vector); @@ -1921,6 +1925,7 @@ static void __smp_error_interrupt(struct pt_regs *regs) __visible void __irq_entry smp_error_interrupt(struct pt_regs *regs) { entering_irq(); + check_poll(); __smp_error_interrupt(regs); exiting_irq(); } @@ -1928,6 +1933,7 @@ __visible void __irq_entry smp_error_interrupt(struct pt_regs *regs) __visible void __irq_entry smp_trace_error_interrupt(struct pt_regs *regs) { entering_irq(); + check_poll(); trace_error_apic_entry(ERROR_APIC_VECTOR); __smp_error_interrupt(regs); trace_error_apic_exit(ERROR_APIC_VECTOR); diff --git a/arch/x86/kernel/apic/vector.c b/arch/
[PATCH v5 1/5] powerpc/8xx: macro for handling CPU15 errata
Having a macro will help keep clear code. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 9b53fe1..1279018 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -297,6 +297,17 @@ SystemCall: * We have to use the MD_xxx registers for the tablewalk because the * equivalent MI_xxx registers only perform the attribute functions. */ + +#ifdef CONFIG_8xx_CPU15 +#define INVALIDATE_ADJACENT_PAGES_CPU15(tmp, addr) \ + additmp, addr, PAGE_SIZE; \ + tlbie tmp;\ + additmp, addr, -PAGE_SIZE; \ + tlbie tmp +#else +#define INVALIDATE_ADJACENT_PAGES_CPU15(tmp, addr) +#endif + InstructionTLBMiss: #ifdef CONFIG_8xx_CPU6 mtspr SPRN_DAR, r3 @@ -304,12 +315,7 @@ InstructionTLBMiss: EXCEPTION_PROLOG_0 mtspr SPRN_SPRG_SCRATCH2, r10 mfspr r10, SPRN_SRR0 /* Get effective address of fault */ -#ifdef CONFIG_8xx_CPU15 - addir11, r10, PAGE_SIZE - tlbie r11 - addir11, r10, -PAGE_SIZE - tlbie r11 -#endif + INVALIDATE_ADJACENT_PAGES_CPU15(r11, r10) /* If we are faulting a kernel address, we have to use the * kernel page tables. -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 5/5] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000
By default, TASK_SIZE is set to 0x8000 for PPC_8xx, which is most likely sufficient for most cases. However, kernel configuration allows to set TASK_SIZE to another value, so the 8xx shall handle it. This patch also takes into account the case of PAGE_OFFSET lower than 0x8000, allthought most of the time it is equal to 0xC000 Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index ba2dc53..c640bbb 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -48,6 +48,19 @@ mtspr spr, reg #endif +/* Macro to test if an address is a kernel address */ +#if CONFIG_TASK_SIZE <= 0x8000 && CONFIG_PAGE_OFFSET >= 0x8000 +#define IS_KERNEL(tmp, addr) \ + andis. tmp, addr, 0x8000 /* Address >= 0x8000 */ +#define BRANCH_UNLESS_KERNEL(label)beq label +#else +#define IS_KERNEL(tmp, addr) \ + rlwinm tmp, addr, 16, 16, 31; \ + cmpli cr0, tmp, PAGE_OFFSET >> 16 +#define BRANCH_UNLESS_KERNEL(label)blt label +#endif + + /* * Value for the bits that have fixed value in RPN entries. * Also used for tagging DAR for DTLBerror. @@ -322,9 +335,9 @@ InstructionTLBMiss: mfspr r11, SPRN_SRR0 /* Get effective address of fault */ INVALIDATE_ADJACENT_PAGES_CPU15(r10, r11) mfcrr10 - andis. r11, r11, 0x8000/* Address >= 0x8000 */ + IS_KERNEL(r11, r11) mfspr r11, SPRN_M_TW /* Get level 1 table */ - beq 3f + BRANCH_UNLESS_KERNEL(3f) lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha 3: mtcrr10 @@ -379,9 +392,9 @@ DataStoreTLBMiss: * kernel page tables. */ mfspr r11, SPRN_MD_EPN - andis. r11, r11, 0x8000 + IS_KERNEL(r11, r11) mfspr r11, SPRN_M_TW /* Get level 1 table */ - beq 3f + BRANCH_UNLESS_KERNEL(3f) lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha 3: mtcrr10 @@ -513,9 +526,9 @@ FixupDAR:/* Entry point for dcbx workaround. */ mtspr SPRN_SPRG_SCRATCH2, r10 /* fetch instruction from memory. */ mfspr r10, SPRN_SRR0 - andis. r11, r10, 0x8000/* Address >= 0x8000 */ + IS_KERNEL(r11, r10) mfspr r11, SPRN_M_TW /* Get level 1 table */ - beq 3f + BRANCH_UNLESS_KERNEL(3f) lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha /* Insert level 1 index */ 3: rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 4/5] powerpc/8xx: Use SPRG2 instead of DAR for saving r3
We now have SPRG2 available as in it not used anymore for saving CR, so we don't need to crash DAR anymore for saving r3 for CPU6 ERRATA handling. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 150d03f..ba2dc53 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -309,7 +309,7 @@ SystemCall: InstructionTLBMiss: #ifdef CONFIG_8xx_CPU6 - mtspr SPRN_DAR, r3 + mtspr SPRN_SPRG_SCRATCH2, r3 #endif EXCEPTION_PROLOG_0 @@ -362,8 +362,7 @@ InstructionTLBMiss: /* Restore registers */ #ifdef CONFIG_8xx_CPU6 - mfspr r3, SPRN_DAR - mtspr SPRN_DAR, r11 /* Tag DAR */ + mfspr r3, SPRN_SPRG_SCRATCH2 #endif EXCEPTION_EPILOG_0 rfi @@ -371,7 +370,7 @@ InstructionTLBMiss: . = 0x1200 DataStoreTLBMiss: #ifdef CONFIG_8xx_CPU6 - mtspr SPRN_DAR, r3 + mtspr SPRN_SPRG_SCRATCH2, r3 #endif EXCEPTION_PROLOG_0 mfcrr10 @@ -438,7 +437,7 @@ DataStoreTLBMiss: /* Restore registers */ #ifdef CONFIG_8xx_CPU6 - mfspr r3, SPRN_DAR + mfspr r3, SPRN_SPRG_SCRATCH2 #endif mtspr SPRN_DAR, r11 /* Tag DAR */ EXCEPTION_EPILOG_0 -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 2/5] powerpc/8xx: Handle CR out of exception PROLOG/EPILOG
In order to be able to reduce scope during which CR is saved, we take CR saving/restoring out of exception PROLOG and EPILOG Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1279018..5a69c5e 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -116,13 +116,13 @@ turn_on_mmu: */ #define EXCEPTION_PROLOG \ EXCEPTION_PROLOG_0; \ + mfcrr10;\ EXCEPTION_PROLOG_1; \ EXCEPTION_PROLOG_2 #define EXCEPTION_PROLOG_0 \ mtspr SPRN_SPRG_SCRATCH0,r10; \ - mtspr SPRN_SPRG_SCRATCH1,r11; \ - mfcrr10 + mtspr SPRN_SPRG_SCRATCH1,r11 #define EXCEPTION_PROLOG_1 \ mfspr r11,SPRN_SRR1; /* check whether user or kernel */ \ @@ -162,7 +162,6 @@ turn_on_mmu: * Exception exit code. */ #define EXCEPTION_EPILOG_0 \ - mtcrr10;\ mfspr r10,SPRN_SPRG_SCRATCH0; \ mfspr r11,SPRN_SPRG_SCRATCH1 @@ -313,6 +312,7 @@ InstructionTLBMiss: mtspr SPRN_DAR, r3 #endif EXCEPTION_PROLOG_0 + mfcrr10 mtspr SPRN_SPRG_SCRATCH2, r10 mfspr r10, SPRN_SRR0 /* Get effective address of fault */ INVALIDATE_ADJACENT_PAGES_CPU15(r11, r10) @@ -363,6 +363,7 @@ InstructionTLBMiss: mtspr SPRN_DAR, r11 /* Tag DAR */ #endif mfspr r10, SPRN_SPRG_SCRATCH2 + mtcrr10 EXCEPTION_EPILOG_0 rfi @@ -372,6 +373,7 @@ DataStoreTLBMiss: mtspr SPRN_DAR, r3 #endif EXCEPTION_PROLOG_0 + mfcrr10 mtspr SPRN_SPRG_SCRATCH2, r10 mfspr r10, SPRN_MD_EPN @@ -437,6 +439,7 @@ DataStoreTLBMiss: #endif mtspr SPRN_DAR, r11 /* Tag DAR */ mfspr r10, SPRN_SPRG_SCRATCH2 + mtcrr10 EXCEPTION_EPILOG_0 rfi @@ -462,6 +465,7 @@ InstructionTLBError: . = 0x1400 DataTLBError: EXCEPTION_PROLOG_0 + mfcrr10 mfspr r11, SPRN_DAR cmpwi cr0, r11, RPN_PATTERN -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 0/5] powerpc8xx: Further optimisation of TLB handling
This patchset provides a further optimisation of TLB handling in the 8xx. Changes are: - Not saving registers like CR when not needed - Adding support to any TASK_SIZE Only the last patch of the set is changed compared to v4 Christophe Leroy (5): powerpc/8xx: macro for handling CPU15 errata powerpc/8xx: Handle CR out of exception PROLOG/EPILOG powerpc/8xx: dont save CR in SCRATCH registers powerpc/8xx: Use SPRG2 instead of DAR for saving r3 powerpc/8xx: Add support for TASK_SIZE greater than 0x8000 arch/powerpc/kernel/head_8xx.S | 79 +++--- 1 file changed, 51 insertions(+), 28 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 3/5] powerpc/8xx: dont save CR in SCRATCH registers
CR only needs to be preserved when checking if we are handling a kernel address. So we can preserve CR in a register: - In ITLBMiss, check is done only when CONFIG_MODULES is defined. Otherwise we don't need to do anything at all with CR. - We use r10, then we reload SRR0/MD_EPN into r10 when CR is restored Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 5a69c5e..150d03f 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -312,10 +312,6 @@ InstructionTLBMiss: mtspr SPRN_DAR, r3 #endif EXCEPTION_PROLOG_0 - mfcrr10 - mtspr SPRN_SPRG_SCRATCH2, r10 - mfspr r10, SPRN_SRR0 /* Get effective address of fault */ - INVALIDATE_ADJACENT_PAGES_CPU15(r11, r10) /* If we are faulting a kernel address, we have to use the * kernel page tables. @@ -323,13 +319,20 @@ InstructionTLBMiss: #ifdef CONFIG_MODULES /* Only modules will cause ITLB Misses as we always * pin the first 8MB of kernel memory */ - andis. r11, r10, 0x8000/* Address >= 0x8000 */ -#endif + mfspr r11, SPRN_SRR0 /* Get effective address of fault */ + INVALIDATE_ADJACENT_PAGES_CPU15(r10, r11) + mfcrr10 + andis. r11, r11, 0x8000/* Address >= 0x8000 */ mfspr r11, SPRN_M_TW /* Get level 1 table */ -#ifdef CONFIG_MODULES beq 3f lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha 3: + mtcrr10 + mfspr r10, SPRN_SRR0 /* Get effective address of fault */ +#else + mfspr r10, SPRN_SRR0 /* Get effective address of fault */ + INVALIDATE_ADJACENT_PAGES_CPU15(r11, r10) + mfspr r11, SPRN_M_TW /* Get level 1 table base address */ #endif /* Insert level 1 index */ rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 @@ -362,8 +365,6 @@ InstructionTLBMiss: mfspr r3, SPRN_DAR mtspr SPRN_DAR, r11 /* Tag DAR */ #endif - mfspr r10, SPRN_SPRG_SCRATCH2 - mtcrr10 EXCEPTION_EPILOG_0 rfi @@ -374,17 +375,19 @@ DataStoreTLBMiss: #endif EXCEPTION_PROLOG_0 mfcrr10 - mtspr SPRN_SPRG_SCRATCH2, r10 - mfspr r10, SPRN_MD_EPN /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - andis. r11, r10, 0x8000 + mfspr r11, SPRN_MD_EPN + andis. r11, r11, 0x8000 mfspr r11, SPRN_M_TW /* Get level 1 table */ beq 3f lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha 3: + mtcrr10 + mfspr r10, SPRN_MD_EPN + /* Insert level 1 index */ rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11)/* Get the level 1 entry */ @@ -438,8 +441,6 @@ DataStoreTLBMiss: mfspr r3, SPRN_DAR #endif mtspr SPRN_DAR, r11 /* Tag DAR */ - mfspr r10, SPRN_SPRG_SCRATCH2 - mtcrr10 EXCEPTION_EPILOG_0 rfi -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] perf core: Use KSTK_ESP() instead of pt_regs->sp while output user regs
From: Chenggang Qin For x86_64, the exact value of user stack's esp should be got by KSTK_ESP(current). current->thread.usersp is copied from PDA while enter ring0. Now, we output the value of sp from pt_regs. But pt_regs->sp has changed before it was pushed into kernel stack. So, we cannot get the correct callchain while unwind some user stacks. For example, if the stack contains __lll_unlock_wake()/__lll_lock_wait(), the callchain will break some times with the latest version of libunwind. The root cause is the sp that is used by libunwind may be wrong. If we use KSTK_ESP(current), the correct callchain can be got everytime. Other architectures also have KSTK_ESP() macro. Signed-off-by: Chenggang Qin Cc: Andrew Morton Cc: Arjan van de Ven Cc: David Ahern Cc: Ingo Molnar Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Wu Fengguang Cc: Yanmin Zhang --- arch/x86/kernel/perf_regs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/perf_regs.c b/arch/x86/kernel/perf_regs.c index e309cc5..5da8df8 100644 --- a/arch/x86/kernel/perf_regs.c +++ b/arch/x86/kernel/perf_regs.c @@ -60,6 +60,9 @@ u64 perf_reg_value(struct pt_regs *regs, int idx) if (WARN_ON_ONCE(idx >= ARRAY_SIZE(pt_regs_offset))) return 0; + if (idx == PERF_REG_X86_SP) + return KSTK_ESP(current); + return regs_get_register(regs, pt_regs_offset[idx]); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: nfsv4.1 client refuses to suspend
On Fri, Mar 22, 2013 at 07:40:03AM -0400, Jeff Layton wrote: > On Fri, 22 Mar 2013 10:57:21 +0800 > ycn...@gmail.com wrote: > > > nfsv4.1 client suspending fails with such info > > > > Freezing of tasks failed after 20.00 seconds (1 tasks refusing to freeze, > > wq_busy=0): > > nfsv4.1-svc S 88007889f2e0 0 3191 2 0x0080 > > 88007b2f3e28 0046 88007b2f2010 000127c0 > > 880079b08000 000127c0 88007b2f3fd8 000127c0 > > 88007b2f3fd8 000127c0 81a14410 880079b08000 > > Call Trace: > > [] schedule+0x64/0x66 > > [] nfs41_callback_svc+0x100/0x129 [nfsv4] > > [] ? wake_up_bit+0x2a/0x2a > > [] ? nfs_callback_up+0x548/0x548 [nfsv4] > > [] kthread+0xb5/0xbd > > [] ? kthread_freezable_should_stop+0x65/0x65 > > [] ret_from_fork+0x7c/0xb0 > > [] ? kthread_freezable_should_stop+0x65/0x65 > > > > I read such threads > > [1] nfs/sunrpc: allow freezing of tasks with NFS calls in flight > > [2] LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held! > > and then modify nfs41_callback_svc(). It works on my machine. I don't know > > the details of freezing, so I'm not sure if the modification is reasonable. > > This is not a formal patch. Thanks. > > > > Signed-off-by: Yanchuan Nian > > --- > > fs/nfs/callback.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c > > index 5088b57..8addb7b 100644 > > --- a/fs/nfs/callback.c > > +++ b/fs/nfs/callback.c > > @@ -138,7 +138,7 @@ nfs41_callback_svc(void *vrqstp) > > error); > > } else { > > spin_unlock_bh(&serv->sv_cb_lock); > > - schedule(); > > + freezable_schedule(); > > } > > finish_wait(&serv->sv_cb_waitq, &wq); > > } > > I think it'd be better to have that thread call try_to_freeze() > directly instead of doing this. There are some problems with > freezable_schedule() that still need to be resolved and I suspect that > it will eventually go away entirely. > > It's may be sufficient to simply call try_to_freeze() at the top of > the loop, but that would need to be tested. Thanks, I tried it as follow echo 'mem' > /sys/power/state and it works ok. No further tests. > > -- > Jeff Layton -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/2 RESEND] POSIX-compliant version of fchmodat with flag argument
On Thu, Jan 12, 2012 at 05:53:44PM -0800, Andrew Ayer wrote: > Besides the POSIX-compliance, this patch will make it possible to > ensure, in a race-free way, that you do not follow symlinks when > chmodding. Previously, you could open a file with O_NOFOLLOW and fchmod > it, but this only worked if you had read or write permissions on the > file. Now you can open the file with O_PATH|O_NOFOLLOW and do fchmodat > with AT_EMPTY_PATH. Alexander, this patch solves a particular problem in a useful way. I find it useful and I would be happy to see it included in mainline. Thanks, Kenny -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [BUG] 2.6.24-rc2-mm1 - kernel bug on nfs v4
On Sat, Nov 17, 2007 at 07:09:46PM +0100, Ingo Molnar wrote: > > * Torsten Kaiser <[EMAIL PROTECTED]> wrote: > > > Sadly lockdep does not work for me, as it gets turned off early: > > [ 39.851594] - > > [ 39.855963] inconsistent {softirq-on-W} -> {in-softirq-W} usage. > > [ 39.861981] swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes: > > [ 39.866963] (&n->list_lock){-+..}, at: [] > > hey, that means it found a bug - which is not sad at all :-) --- Subject: lockdep: slub: annotate boot time node->list_lock usage inconsistent {softirq-on-W} -> {in-softirq-W} usage. swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes: (&n->list_lock){-+..}, at: [] add_partial+0x31/0xa0 {softirq-on-W} state was registered at: [] __lock_acquire+0x3e8/0x1140 [] debug_check_no_locks_freed+0x188/0x1a0 [] lock_acquire+0x55/0x70 [] add_partial+0x31/0xa0 [] _spin_lock+0x1e/0x30 [] add_partial+0x31/0xa0 [] kmem_cache_open+0x1cc/0x330 [] _spin_unlock_irq+0x24/0x30 [] create_kmalloc_cache+0x64/0xf0 [] init_alloc_cpu_cpu+0x70/0x90 [] kmem_cache_init+0x65/0x1d0 [] start_kernel+0x23e/0x350 [] _sinittext+0x12d/0x140 [] 0x Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> CC: Christoph Lameter <[EMAIL PROTECTED]> CC: Kamalesh Babulal <[EMAIL PROTECTED]> --- mm/slub.c |8 1 file changed, 8 insertions(+) Index: linux-2.6/mm/slub.c === --- linux-2.6.orig/mm/slub.c +++ linux-2.6/mm/slub.c @@ -2155,6 +2155,7 @@ static struct kmem_cache_node *early_kme { struct page *page; struct kmem_cache_node *n; + unsigned long flags; BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node)); @@ -2179,7 +2180,14 @@ static struct kmem_cache_node *early_kme #endif init_kmem_cache_node(n); atomic_long_inc(&n->nr_slabs); + /* +* lockdep requires consistent irq usage for each lock +* so even though there cannot be a race this early in +* the boot sequence, we still disable irqs. +*/ + local_irq_save(flags); add_partial(kmalloc_caches, page, 0); + local_irq_restore(flags); return n; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Linux Kernel Markers - performance characterization with large IO load on large-ish system
Ingo Molnar wrote: actually, the pure marker overhead seems to be a regression: Kernel Options Min valAvg valMax valStd Dev - markers - bt cfg 15.349127 16.169459 16.372980 0.184417 + markers - bt cfg 15.280382 16.202398 16.409257 0.191861 why isnt the marker near zero-cost as it should be? (as long as they are enabled but are not in actual use) 2% increase is _ALOT_. The increase in the mean is actually 0.033, or 0.2%. So there's something wrong going on - either markers have unacceptably high cost, or the measurement is not valid. The third option is that the measurement just needs to be done more times. The standard error in the mean for the + markers case is 0.191861 / sqrt(10) = 0.061, which is twice the size of the difference being measured. -- Joshua Root, jmr AT gelato.unsw.edu.au http://www.gelato.unsw.edu.au - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Scheduler: Improving the scheduler performance.
[PATCH] Scheduler: Improving the scheduler performance. As we know that, linux scheduler use separate runqueue for every CPU of a multiprocessor system, which having an active and an expired array.If we use only one expired array, then the CPUs of a multiprocessor system will be able to share their expired task via the accumulated expired array,which will be declared outside of the runqueue array.Here,the accumulated expired array has been called global expired array(declared as "glo_expired").So, any CPU without active task, will check the global expired array.Now,with separate expired array the chance of an empty expired array is high,than the accumulated expired array(global expired array).As a result CPU will be less idle.When a task will finish its timeslice,then it will kept in the global expired array(if the task isn't 'interactive').And the pressure will be less over the schedule domain.So, I think it will help to improve the performance of the linux scheduler.Here,struct prio_array *expired has been removed from the runqueue structure and has been declared outside of the runqueue array for making it global,thus every CPU can access it with ease.Then in the __activate_task function, after a check for batch task expired array of the runqueue were put into the target.Now we've to put the glo_expired array into the target.Then in the move_tasks function, the balancing operation within the domain will be over the active array,because there is no expired array in the runqueue.Then in the skip_bitmap section, check will be made against only busiest->active->nr_active,because in runqueue there is no expired array.In scheduler_tick function,in place of rq->expired array will replaced by glo_expired array.In the main function schedule,before call idle_balance function a check is made against rq->nr_running and glo_expired->nr_running.Because, if both active and glo_expired array are empty then a CPU becomes idle.Then switching will be between active and glo_expired array.In the sys_sched_yield function,rq->expired will be replaced by the glo_expired array.So,scheduler will use only one expired array instead of separate expired array of a multiprocessor system.And the necessary changes are very simple,so it won't cause much problem.But will help in improving performance. This patch has been applied on kernel version-2.6.18 .[NOTE: In prio_array structure,the number of active processes,might needs to be increased,if the number of CPU is too much,then unsigned long would be helpful instead of int.] Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by:Md.Rakib Hassan Mullick <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> --- /root/devel/linux-2.6.18/kernel/sched.c 2006-09-20 09:42:06.0 +0600 +++ /usr/src/linux-2.6.18/kernel/sched.c2007-04-05 22:20:24.0 +0600 @@ -228,7 +228,7 @@ struct rq { unsigned long long timestamp_last_tick; struct task_struct *curr, *idle; struct mm_struct *prev_mm; - struct prio_array *active, *expired, arrays[2]; + struct prio_array *active, arrays[2]; int best_expired_prio; atomic_t nr_iowait; @@ -265,6 +265,8 @@ struct rq { struct lock_class_key rq_lock_key; }; +struct prio_array *glo_expired; + static DEFINE_PER_CPU(struct rq, runqueues); /* @@ -834,7 +836,7 @@ static void __activate_task(struct task_ struct prio_array *target = rq->active; if (batch_task(p)) - target = rq->expired; + target = glo_expired; enqueue_task(p, target); inc_n
[PATCH 05/12] mm: count unstable pages per BDI
Count per BDI unstable pages. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- fs/nfs/write.c |4 include/linux/backing-dev.h |1 + 2 files changed, 5 insertions(+) Index: linux-2.6/fs/nfs/write.c === --- linux-2.6.orig/fs/nfs/write.c +++ linux-2.6/fs/nfs/write.c @@ -451,6 +451,7 @@ nfs_mark_request_commit(struct nfs_page nfsi->ncommit++; spin_unlock(&nfsi->req_lock); inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + inc_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); __mark_inode_dirty(inode, I_DIRTY_DATASYNC); } #endif @@ -511,6 +512,7 @@ static void nfs_cancel_commit_list(struc while(!list_empty(head)) { req = nfs_list_entry(head->next); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); nfs_list_remove_request(req); nfs_inode_remove_request(req); nfs_unlock_request(req); @@ -1236,6 +1238,7 @@ nfs_commit_list(struct inode *inode, str nfs_list_remove_request(req); nfs_mark_request_commit(req); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); nfs_clear_page_writeback(req); } return -ENOMEM; @@ -1260,6 +1263,7 @@ static void nfs_commit_done(struct rpc_t req = nfs_list_entry(data->pages.next); nfs_list_remove_request(req); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); dprintk("NFS: commit (%s/%Ld [EMAIL PROTECTED])", req->wb_context->dentry->d_inode->i_sb->s_id, Index: linux-2.6/include/linux/backing-dev.h === --- linux-2.6.orig/include/linux/backing-dev.h +++ linux-2.6/include/linux/backing-dev.h @@ -26,6 +26,7 @@ enum bdi_state { enum bdi_stat_item { BDI_DIRTY, BDI_WRITEBACK, + BDI_UNSTABLE, NR_BDI_STAT_ITEMS }; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 12/12] mm: per BDI congestion feedback
Now that we have per BDI dirty throttling is makes sense to also have oer BDI congestion feedback; why wait on another device if the current one is not congested. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- drivers/block/pktcdvd.c |2 - drivers/md/dm-crypt.c |7 +++-- fs/cifs/file.c |2 - fs/ext4/writeback.c |2 - fs/fat/file.c |4 ++ fs/fs-writeback.c |2 - fs/nfs/write.c |2 - fs/reiser4/vfs_ops.c|2 - fs/reiserfs/journal.c |7 +++-- fs/xfs/linux-2.6/xfs_aops.c |2 - include/linux/backing-dev.h |7 +++-- include/linux/writeback.h |3 +- mm/backing-dev.c| 61 mm/page-writeback.c | 19 +++-- mm/vmscan.c | 19 +++-- 15 files changed, 88 insertions(+), 53 deletions(-) Index: linux-2.6-mm/include/linux/backing-dev.h === --- linux-2.6-mm.orig/include/linux/backing-dev.h 2007-04-05 18:24:34.0 +0200 +++ linux-2.6-mm/include/linux/backing-dev.h2007-04-05 19:26:24.0 +0200 @@ -10,6 +10,7 @@ #include #include +#include #include struct page; @@ -52,6 +53,8 @@ struct backing_dev_info { void (*unplug_io_fn)(struct backing_dev_info *, struct page *); void *unplug_io_data; + wait_queue_head_t congestion_wqh[2]; + /* * data used for scaling the writeback cache */ @@ -214,8 +217,8 @@ static inline int bdi_rw_congested(struc void clear_bdi_congested(struct backing_dev_info *bdi, int rw); void set_bdi_congested(struct backing_dev_info *bdi, int rw); -long congestion_wait(int rw, long timeout); -long congestion_wait_interruptible(int rw, long timeout); +long congestion_wait(struct backing_dev_info *bdi, int rw, long timeout); +long congestion_wait_interruptible(struct backing_dev_info *bdi, int rw, long timeout); #define bdi_cap_writeback_dirty(bdi) \ (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK)) Index: linux-2.6-mm/mm/backing-dev.c === --- linux-2.6-mm.orig/mm/backing-dev.c 2007-04-05 18:24:34.0 +0200 +++ linux-2.6-mm/mm/backing-dev.c 2007-04-05 18:26:00.0 +0200 @@ -5,16 +5,10 @@ #include #include -static wait_queue_head_t congestion_wqh[2] = { - __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[0]), - __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[1]) - }; - - void clear_bdi_congested(struct backing_dev_info *bdi, int rw) { enum bdi_state bit; - wait_queue_head_t *wqh = &congestion_wqh[rw]; + wait_queue_head_t *wqh = &bdi->congestion_wqh[rw]; bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested; clear_bit(bit, &bdi->state); @@ -42,31 +36,48 @@ EXPORT_SYMBOL(set_bdi_congested); * write congestion. If no backing_devs are congested then just wait for the * next write to be completed. */ -long congestion_wait(int rw, long timeout) +long congestion_wait(struct backing_dev_info *bdi, int rw, long timeout) { - long ret; + long ret = 0; DEFINE_WAIT(wait); - wait_queue_head_t *wqh = &congestion_wqh[rw]; + wait_queue_head_t *wqh = &bdi->congestion_wqh[rw]; - prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); - ret = io_schedule_timeout(timeout); - finish_wait(wqh, &wait); + if (bdi_congested(bdi, rw)) { + for (;;) { + prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); + if (!bdi_congested(bdi, rw)) + break; + ret = io_schedule_timeout(timeout); + if (!ret) + break; + } + finish_wait(wqh, &wait); + } return ret; } EXPORT_SYMBOL(congestion_wait); -long congestion_wait_interruptible(int rw, long timeout) +long congestion_wait_interruptible(struct backing_dev_info *bdi, + int rw, long timeout) { - long ret; + long ret = 0; DEFINE_WAIT(wait); - wait_queue_head_t *wqh = &congestion_wqh[rw]; + wait_queue_head_t *wqh = &bdi->congestion_wqh[rw]; - prepare_to_wait(wqh, &wait, TASK_INTERRUPTIBLE); - if (signal_pending(current)) - ret = -ERESTARTSYS; - else - ret = io_schedule_timeout(timeout); - finish_wait(wqh, &wait); + if (bdi_congested(bdi, rw)) { + for (;;) { + prepare_to_wait(wqh, &wait, TASK_INTERRUPTIBLE); + if (!bdi_congested(bdi, rw)) + break; + if (signal_pending(current)) + ret = -ERESTARTSYS; + else +
[PATCH 10/12] mm: page_alloc_wait
Introduce a mechanism to wait on free memory. Currently congestion_wait() is abused to do this. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- arch/i386/lib/usercopy.c |2 +- fs/xfs/linux-2.6/kmem.c |4 ++-- include/linux/mm.h |3 +++ mm/page_alloc.c | 25 +++-- mm/shmem.c |2 +- mm/vmscan.c |1 + 6 files changed, 31 insertions(+), 6 deletions(-) Index: linux-2.6-mm/arch/i386/lib/usercopy.c === --- linux-2.6-mm.orig/arch/i386/lib/usercopy.c 2007-04-05 16:24:15.0 +0200 +++ linux-2.6-mm/arch/i386/lib/usercopy.c 2007-04-05 16:29:49.0 +0200 @@ -751,7 +751,7 @@ survive: if (retval == -ENOMEM && is_init(current)) { up_read(¤t->mm->mmap_sem); - congestion_wait(WRITE, HZ/50); + page_alloc_wait(HZ/50); goto survive; } Index: linux-2.6-mm/fs/xfs/linux-2.6/kmem.c === --- linux-2.6-mm.orig/fs/xfs/linux-2.6/kmem.c 2007-04-05 16:24:15.0 +0200 +++ linux-2.6-mm/fs/xfs/linux-2.6/kmem.c2007-04-05 16:29:49.0 +0200 @@ -53,7 +53,7 @@ kmem_alloc(size_t size, unsigned int __n printk(KERN_ERR "XFS: possible memory allocation " "deadlock in %s (mode:0x%x)\n", __FUNCTION__, lflags); - congestion_wait(WRITE, HZ/50); + page_alloc_wait(HZ/50); } while (1); } @@ -131,7 +131,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsig printk(KERN_ERR "XFS: possible memory allocation " "deadlock in %s (mode:0x%x)\n", __FUNCTION__, lflags); - congestion_wait(WRITE, HZ/50); + page_alloc_wait(HZ/50); } while (1); } Index: linux-2.6-mm/include/linux/mm.h === --- linux-2.6-mm.orig/include/linux/mm.h2007-04-05 16:24:15.0 +0200 +++ linux-2.6-mm/include/linux/mm.h 2007-04-05 16:29:49.0 +0200 @@ -1028,6 +1028,9 @@ extern void setup_per_cpu_pageset(void); static inline void setup_per_cpu_pageset(void) {} #endif +void page_alloc_ok(void); +long page_alloc_wait(long timeout); + /* prio_tree.c */ void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); Index: linux-2.6-mm/mm/page_alloc.c === --- linux-2.6-mm.orig/mm/page_alloc.c 2007-04-05 16:24:15.0 +0200 +++ linux-2.6-mm/mm/page_alloc.c2007-04-05 16:35:04.0 +0200 @@ -107,6 +107,9 @@ unsigned long __meminitdata nr_kernel_pa unsigned long __meminitdata nr_all_pages; static unsigned long __initdata dma_reserve; +static wait_queue_head_t page_alloc_wqh = + __WAIT_QUEUE_HEAD_INITIALIZER(page_alloc_wqh); + #ifdef CONFIG_ARCH_POPULATES_NODE_MAP /* * MAX_ACTIVE_REGIONS determines the maxmimum number of distinct @@ -1698,7 +1701,7 @@ nofail_alloc: if (page) goto got_pg; if (gfp_mask & __GFP_NOFAIL) { - congestion_wait(WRITE, HZ/50); + page_alloc_wait(HZ/50); goto nofail_alloc; } } @@ -1763,7 +1766,7 @@ nofail_alloc: do_retry = 1; } if (do_retry) { - congestion_wait(WRITE, HZ/50); + page_alloc_wait(HZ/50); goto rebalance; } @@ -4217,3 +4220,21 @@ void set_pageblock_flags_group(struct pa else __clear_bit(bitidx + start_bitidx, bitmap); } + +void page_alloc_ok(void) +{ + if (waitqueue_active(&page_alloc_wqh)) + wake_up(&page_alloc_wqh); +} + +long page_alloc_wait(long timeout) +{ + long ret; + DEFINE_WAIT(wait); + + prepare_to_wait(&page_alloc_wqh, &wait, TASK_UNINTERRUPTIBLE); + ret = schedule_timeout(timeout); + finish_wait(&page_alloc_wqh, &wait); + return ret; +} +EXPORT_SYMBOL(page_alloc_wait); Index: linux-2.6-mm/mm/shmem.c === --- linux-2.6-mm.orig/mm/shmem.c2007-04-05 16:24:15.0 +0200 +++ linux-2.6-mm/mm/shmem.c 2007-04-05 16:30:31.0 +0200 @@ -1216,7 +1216,7 @@ repeat: page_cache_release(swappage); if (error == -ENOMEM) { /* let
[PATCH 07/12] mm: per device dirty threshold
Scale writeback cache per backing device, proportional to its writeout speed. akpm sayeth: > Which problem are we trying to solve here? afaik our two uppermost > problems are: > > a) Heavy write to queue A causes light writer to queue B to blok for a long > time in balance_dirty_pages(). Even if the devices have the same speed. This one; esp when not the same speed. The - my usb stick makes my computer suck - problem. But even on similar speed, the separation of device should avoid blocking dev B when dev A is being throttled. The writeout speed is measure dynamically, so when it doesn't have anything to write out for a while its writeback cache size goes to 0. Conversely, when starting up it will in the beginning act almost synchronous but will quickly build up a 'fair' share of the writeback cache. > b) heavy write to device A causes light write to device A to block for a > long time in balance_dirty_pages(), occasionally. Harder to fix. This will indeed take more. I've thought about it though. But one quickly ends up with per task state. How it all works: We pick a 2^n value based on the total vm size to act as a period - vm_cycle_shift. This period measures 'time' in writeout events. Each writeout increases time and adds to a per bdi counter. This counter is halved when a period expires. So per bdi speed is: 0.5 * (previous cycle speed) + this cycle's events. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- include/linux/backing-dev.h |8 ++ mm/backing-dev.c|3 mm/page-writeback.c | 166 +++- 3 files changed, 145 insertions(+), 32 deletions(-) Index: linux-2.6/include/linux/backing-dev.h === --- linux-2.6.orig/include/linux/backing-dev.h +++ linux-2.6/include/linux/backing-dev.h @@ -27,6 +27,8 @@ enum bdi_stat_item { BDI_DIRTY, BDI_WRITEBACK, BDI_UNSTABLE, + BDI_WRITEOUT, + BDI_WRITEOUT_TOTAL, NR_BDI_STAT_ITEMS }; @@ -50,6 +52,12 @@ struct backing_dev_info { void (*unplug_io_fn)(struct backing_dev_info *, struct page *); void *unplug_io_data; + /* +* data used for scaling the writeback cache +*/ + spinlock_t lock;/* protect the cycle count */ + unsigned long cycles; /* writeout cycles */ + atomic_long_t bdi_stats[NR_BDI_STAT_ITEMS]; #ifdef CONFIG_SMP struct bdi_per_cpu_data pcd[NR_CPUS]; Index: linux-2.6/mm/page-writeback.c === --- linux-2.6.orig/mm/page-writeback.c +++ linux-2.6/mm/page-writeback.c @@ -49,8 +49,6 @@ */ static long ratelimit_pages = 32; -static int dirty_exceeded __cacheline_aligned_in_smp; /* Dirty mem may be over limit */ - /* * When balance_dirty_pages decides that the caller needs to perform some * non-background writeback, this is how many pages it will attempt to write. @@ -103,6 +101,87 @@ EXPORT_SYMBOL(laptop_mode); static void background_writeout(unsigned long _min_pages); /* + * Scale the writeback cache size proportional to the relative writeout speeds. + * + * We do this by tracking a floating average per BDI and a global floating + * average. We optimize away the '/= 2' for the global average by noting that: + * + * if (++i > thresh) i /= 2: + * + * Can be approximated by: + * + * thresh/2 + (++i % thresh/2) + * + * Furthermore, when we choose thresh to be 2^n it can be written in terms of + * binary operations and wraparound artifacts disappear. + * + * Also note that this yields a natural counter of the elapsed periods: + * + * i / thresh + * + * Its monotonous increasing property can be applied to mitigate the wrap- + * around issue. + */ +static int vm_cycle_shift __read_mostly; + +/* + * Sync up the per BDI average to the global cycle. + */ +static void bdi_writeout_norm(struct backing_dev_info *bdi) +{ + int bits = vm_cycle_shift; + unsigned long cycle = 1UL << bits; + unsigned long mask = ~(cycle - 1); + unsigned long global_cycle = + (__global_bdi_stat(BDI_WRITEOUT_TOTAL) << 1) & mask; + unsigned long flags; + + if ((bdi->cycles & mask) == global_cycle) + return; + + spin_lock_irqsave(&bdi->lock, flags); + while ((bdi->cycles & mask) != global_cycle) { + unsigned long val = __bdi_stat(bdi, BDI_WRITEOUT); + unsigned long half = (val + 1) >> 1; + + if (!val) + break; + + mod_bdi_stat(bdi, BDI_WRITEOUT, -half); + bdi->cycles += cycle; + } + bdi->cycles = global_cycle; + spin_unlock_irqrestore(&bdi->lock, flags); +} + +static void bdi_writeout_inc(struct backing_dev_info *bdi) +{ + if (!bdi_cap_writeback_dirty(bdi)) + return; + + bdi_writeout_norm(bdi); + + __inc_bdi_stat(bdi, BDI_WRITEOUT
[PATCH 06/12] mm: expose BDI statistics in sysfs.
Expose the per BDI stats in /sys/block//queue/* Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- block/ll_rw_blk.c | 81 mm/page-writeback.c |2 - 2 files changed, 82 insertions(+), 1 deletion(-) Index: linux-2.6/block/ll_rw_blk.c === --- linux-2.6.orig/block/ll_rw_blk.c +++ linux-2.6/block/ll_rw_blk.c @@ -3975,6 +3975,20 @@ static ssize_t queue_max_hw_sectors_show return queue_var_show(max_hw_sectors_kb, (page)); } +static ssize_t queue_nr_dirty_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%lu\n", bdi_stat(&q->backing_dev_info, BDI_DIRTY)); +} + +static ssize_t queue_nr_writeback_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%lu\n", bdi_stat(&q->backing_dev_info, BDI_WRITEBACK)); +} + +static ssize_t queue_nr_unstable_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%lu\n", bdi_stat(&q->backing_dev_info, BDI_UNSTABLE)); +} static struct queue_sysfs_entry queue_requests_entry = { .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR }, @@ -4005,6 +4019,21 @@ static struct queue_sysfs_entry queue_ma .show = queue_max_hw_sectors_show, }; +static struct queue_sysfs_entry queue_dirty_entry = { + .attr = {.name = "dirty_pages", .mode = S_IRUGO }, + .show = queue_nr_dirty_show, +}; + +static struct queue_sysfs_entry queue_writeback_entry = { + .attr = {.name = "writeback_pages", .mode = S_IRUGO }, + .show = queue_nr_writeback_show, +}; + +static struct queue_sysfs_entry queue_unstable_entry = { + .attr = {.name = "unstable_pages", .mode = S_IRUGO }, + .show = queue_nr_unstable_show, +}; + static struct queue_sysfs_entry queue_iosched_entry = { .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR }, .show = elv_iosched_show, @@ -4017,6 +4046,9 @@ static struct attribute *default_attrs[] &queue_initial_ra_entry.attr, &queue_max_hw_sectors_entry.attr, &queue_max_sectors_entry.attr, + &queue_dirty_entry.attr, + &queue_writeback_entry.attr, + &queue_unstable_entry.attr, &queue_iosched_entry.attr, NULL, }; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/12] mm: count dirty pages per BDI
Count per BDI dirty pages. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- fs/buffer.c |1 + include/linux/backing-dev.h |1 + mm/page-writeback.c |2 ++ mm/truncate.c |1 + 4 files changed, 5 insertions(+) Index: linux-2.6/fs/buffer.c === --- linux-2.6.orig/fs/buffer.c +++ linux-2.6/fs/buffer.c @@ -740,6 +740,7 @@ int __set_page_dirty_buffers(struct page if (page->mapping) {/* Race with truncate? */ if (mapping_cap_account_dirty(mapping)) { __inc_zone_page_state(page, NR_FILE_DIRTY); + __inc_bdi_stat(mapping->backing_dev_info, BDI_DIRTY); task_io_account_write(PAGE_CACHE_SIZE); } radix_tree_tag_set(&mapping->page_tree, Index: linux-2.6/mm/page-writeback.c === --- linux-2.6.orig/mm/page-writeback.c +++ linux-2.6/mm/page-writeback.c @@ -828,6 +828,7 @@ int __set_page_dirty_nobuffers(struct pa BUG_ON(mapping2 != mapping); if (mapping_cap_account_dirty(mapping)) { __inc_zone_page_state(page, NR_FILE_DIRTY); + __inc_bdi_stat(mapping->backing_dev_info, BDI_DIRTY); task_io_account_write(PAGE_CACHE_SIZE); } radix_tree_tag_set(&mapping->page_tree, @@ -961,6 +962,7 @@ int clear_page_dirty_for_io(struct page */ if (TestClearPageDirty(page)) { dec_zone_page_state(page, NR_FILE_DIRTY); + dec_bdi_stat(mapping->backing_dev_info, BDI_DIRTY); return 1; } return 0; Index: linux-2.6/mm/truncate.c === --- linux-2.6.orig/mm/truncate.c +++ linux-2.6/mm/truncate.c @@ -71,6 +71,7 @@ void cancel_dirty_page(struct page *page struct address_space *mapping = page->mapping; if (mapping && mapping_cap_account_dirty(mapping)) { dec_zone_page_state(page, NR_FILE_DIRTY); + dec_bdi_stat(mapping->backing_dev_info, BDI_DIRTY); if (account_size) task_io_account_cancelled_write(account_size); } Index: linux-2.6/include/linux/backing-dev.h === --- linux-2.6.orig/include/linux/backing-dev.h +++ linux-2.6/include/linux/backing-dev.h @@ -24,6 +24,7 @@ enum bdi_state { }; enum bdi_stat_item { + BDI_DIRTY, NR_BDI_STAT_ITEMS }; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/12] mm: scalable bdi statistics counters.
Provide scalable per backing_dev_info statistics counters modeled on the ZVC code. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- block/ll_rw_blk.c |1 drivers/block/rd.c |2 drivers/char/mem.c |2 fs/char_dev.c |1 fs/fuse/inode.c |1 fs/nfs/client.c |1 include/linux/backing-dev.h | 98 + mm/backing-dev.c| 103 8 files changed, 209 insertions(+) Index: linux-2.6-mm/block/ll_rw_blk.c === --- linux-2.6-mm.orig/block/ll_rw_blk.c 2007-04-05 16:39:56.0 +0200 +++ linux-2.6-mm/block/ll_rw_blk.c 2007-04-05 16:40:45.0 +0200 @@ -208,6 +208,7 @@ void blk_queue_make_request(request_queu blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS); blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS); q->make_request_fn = mfn; + bdi_init(&q->backing_dev_info); blk_queue_max_sectors(q, SAFE_MAX_SECTORS); blk_queue_hardsect_size(q, 512); blk_queue_dma_alignment(q, 511); Index: linux-2.6-mm/include/linux/backing-dev.h === --- linux-2.6-mm.orig/include/linux/backing-dev.h 2007-04-05 16:40:41.0 +0200 +++ linux-2.6-mm/include/linux/backing-dev.h2007-04-05 16:40:45.0 +0200 @@ -8,6 +8,7 @@ #ifndef _LINUX_BACKING_DEV_H #define _LINUX_BACKING_DEV_H +#include #include struct page; @@ -22,6 +23,17 @@ enum bdi_state { BDI_unused, /* Available bits start here */ }; +enum bdi_stat_item { + NR_BDI_STAT_ITEMS +}; + +#ifdef CONFIG_SMP +struct bdi_per_cpu_data { + s8 stat_threshold; + s8 bdi_stat_diff[NR_BDI_STAT_ITEMS]; +} cacheline_aligned_in_smp; +#endif + typedef int (congested_fn)(void *, int); struct backing_dev_info { @@ -34,8 +46,94 @@ struct backing_dev_info { void *congested_data; /* Pointer to aux data for congested func */ void (*unplug_io_fn)(struct backing_dev_info *, struct page *); void *unplug_io_data; + + atomic_long_t bdi_stats[NR_BDI_STAT_ITEMS]; +#ifdef CONFIG_SMP + struct bdi_per_cpu_data pcd[NR_CPUS]; +#endif }; +extern atomic_long_t bdi_stats[NR_BDI_STAT_ITEMS]; + +static inline void bdi_stat_add(long x, struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + atomic_long_add(x, &bdi->bdi_stats[item]); + atomic_long_add(x, &bdi_stats[item]); +} + +static inline unsigned long __global_bdi_stat(enum bdi_stat_item item) +{ + return atomic_long_read(&bdi_stats[item]); +} + +static inline unsigned long __bdi_stat(struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + return atomic_long_read(&bdi->bdi_stats[item]); +} + +/* + * cannot be unsigned long and clip on 0. + */ +static inline unsigned long global_bdi_stat(enum bdi_stat_item item) +{ + long x = atomic_long_read(&bdi_stats[item]); +#ifdef CONFIG_SMP + if (x < 0) + x = 0; +#endif + return x; +} + +static inline unsigned long bdi_stat(struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + long x = atomic_long_read(&bdi->bdi_stats[item]); +#ifdef CONFIG_SMP + if (x < 0) + x = 0; +#endif + return x; +} + +#ifdef CONFIG_SMP +void __mod_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item, int delta); +void __inc_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); +void __dec_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); + +void mod_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item, int delta); +void inc_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); +void dec_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); + +#else /* CONFIG_SMP */ + +static inline void __mod_bdi_stat(struct backing_dev_info *bdi, + enum bdi_stat_item item, int delta) +{ + bdi_stat_add(delta, bdi, item); +} + +static inline void __inc_bdi_stat(struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + atomic_long_inc(&bdi->bdi_stats[item]); + atomic_long_inc(&bdi_stats[item]); +} + +static inline void __dec_bdi_stat(struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + atomic_long_dec(&bdi->bdi_stats[item]); + atomic_long_dec(&bdi_stats[item]); +} + +#define mod_bdi_stat __mod_bdi_stat +#define inc_bdi_stat __inc_bdi_stat +#define dec_bdi_stat __dec_bdi_stat +#endif + +void bdi_init(struct backing_dev_info *bdi); /* * Flags in backing_dev_info::capability Index: linux-2.6-mm/mm/backing-dev.c === --- linux-2.6-mm.orig/mm/backing-dev.c 2007-04-05 16:40:41.0 +0200 +++ linux-2.6-mm/mm/backing-dev.c
[PATCH 09/12] mm: remove throttle_vm_writeback
rely on accurate dirty page accounting to provide enough push back Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- Index: linux-2.6-mm/include/linux/writeback.h === --- linux-2.6-mm.orig/include/linux/writeback.h 2007-04-05 13:23:51.0 +0200 +++ linux-2.6-mm/include/linux/writeback.h 2007-04-05 13:24:11.0 +0200 @@ -84,7 +84,6 @@ static inline void wait_on_inode(struct int wakeup_pdflush(long nr_pages); void laptop_io_completion(void); void laptop_sync_completion(void); -void throttle_vm_writeout(gfp_t gfp_mask); extern struct timer_list laptop_mode_wb_timer; static inline int laptop_spinned_down(void) Index: linux-2.6-mm/mm/page-writeback.c === --- linux-2.6-mm.orig/mm/page-writeback.c 2007-04-05 13:23:51.0 +0200 +++ linux-2.6-mm/mm/page-writeback.c2007-04-05 13:24:38.0 +0200 @@ -437,37 +437,6 @@ void balance_dirty_pages_ratelimited_nr( } EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr); -void throttle_vm_writeout(gfp_t gfp_mask) -{ - long background_thresh; - long dirty_thresh; - - if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { - /* -* The caller might hold locks which can prevent IO completion -* or progress in the filesystem. So we cannot just sit here -* waiting for IO to complete. -*/ - congestion_wait(WRITE, HZ/10); - return; - } - -for ( ; ; ) { - get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL); - -/* - * Boost the allowable dirty threshold a bit for page - * allocators so they don't get DoS'ed by heavy writers - */ -dirty_thresh += dirty_thresh / 10; /* wh... */ - -if (global_page_state(NR_UNSTABLE_NFS) + - global_page_state(NR_WRITEBACK) <= dirty_thresh) - break; -congestion_wait(WRITE, HZ/10); -} -} - /* * writeback at least _min_pages, and keep writing until the amount of dirty * memory is less than the background threshold, or until we're all clean. Index: linux-2.6-mm/mm/vmscan.c === --- linux-2.6-mm.orig/mm/vmscan.c 2007-04-03 12:17:57.0 +0200 +++ linux-2.6-mm/mm/vmscan.c2007-04-05 13:24:03.0 +0200 @@ -1047,8 +1047,6 @@ static unsigned long shrink_zone(int pri } } - throttle_vm_writeout(sc->gfp_mask); - atomic_dec(&zone->reclaim_in_progress); return nr_reclaimed; } -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 08/12] mm: fixup possible deadlock
When the threshol is in the order of the per cpu inaccuracies we can deadlock by not receiveing the updated count, introduce a more expensive but more accurate stat read function to use on low thresholds. (TODO: roll into the bdi_stat patch) Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- include/linux/backing-dev.h | 13 - mm/backing-dev.c| 31 +-- mm/page-writeback.c | 19 +++ 3 files changed, 52 insertions(+), 11 deletions(-) Index: linux-2.6/include/linux/backing-dev.h === --- linux-2.6.orig/include/linux/backing-dev.h +++ linux-2.6/include/linux/backing-dev.h @@ -8,6 +8,7 @@ #ifndef _LINUX_BACKING_DEV_H #define _LINUX_BACKING_DEV_H +#include #include #include @@ -34,7 +35,6 @@ enum bdi_stat_item { #ifdef CONFIG_SMP struct bdi_per_cpu_data { - s8 stat_threshold; s8 bdi_stat_diff[NR_BDI_STAT_ITEMS]; } cacheline_aligned_in_smp; #endif @@ -60,6 +60,7 @@ struct backing_dev_info { atomic_long_t bdi_stats[NR_BDI_STAT_ITEMS]; #ifdef CONFIG_SMP + int stat_threshold; struct bdi_per_cpu_data pcd[NR_CPUS]; #endif }; @@ -109,6 +110,8 @@ static inline unsigned long bdi_stat(str } #ifdef CONFIG_SMP +unsigned long bdi_stat_accurate(struct backing_dev_info *bdi, enum bdi_stat_item item); + void __mod_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item, int delta); void __inc_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); void __dec_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); @@ -117,8 +120,14 @@ void mod_bdi_stat(struct backing_dev_inf void inc_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); void dec_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item); +static inline unsigned long bdi_stat_delta(struct backing_dev_info *bdi) +{ + return num_online_cpus() * bdi->stat_threshold; +} #else /* CONFIG_SMP */ +#define bdi_stat_accurate bdi_stat + static inline void __mod_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item, int delta) { @@ -142,6 +151,8 @@ static inline void __dec_bdi_stat(struct #define mod_bdi_stat __mod_bdi_stat #define inc_bdi_stat __inc_bdi_stat #define dec_bdi_stat __dec_bdi_stat + +#define bdi_stat_delta(bdi) 1UL #endif void bdi_init(struct backing_dev_info *bdi); Index: linux-2.6/mm/backing-dev.c === --- linux-2.6.orig/mm/backing-dev.c +++ linux-2.6/mm/backing-dev.c @@ -98,17 +98,36 @@ void bdi_init(struct backing_dev_in atomic_long_set(&bdi->bdi_stats[i], 0); #ifdef CONFIG_SMP + bdi->stat_threshold = 8 * ilog2(num_online_cpus()); for (i = 0; i < NR_CPUS; i++) { int j; for (j = 0; j < NR_BDI_STAT_ITEMS; j++) bdi->pcd[i].bdi_stat_diff[j] = 0; - bdi->pcd[i].stat_threshold = 8 * ilog2(num_online_cpus()); } #endif } EXPORT_SYMBOL(bdi_init); #ifdef CONFIG_SMP +unsigned long bdi_stat_accurate(struct backing_dev_info *bdi, + enum bdi_stat_item item) +{ + long x = atomic_long_read(&bdi_stats[item]); + int cpu; + + for_each_possible_cpu(cpu) { + struct bdi_per_cpu_data *pcd = &bdi->pcd[cpu]; + s8 *p = pcd->bdi_stat_diff + item; + + x += *p; + } + + if (x < 0) + x = 0; + + return x; +} + void __mod_bdi_stat(struct backing_dev_info *bdi, enum bdi_stat_item item, int delta) { @@ -118,7 +137,7 @@ void __mod_bdi_stat(struct backing_dev_i x = delta + *p; - if (unlikely(x > pcd->stat_threshold || x < -pcd->stat_threshold)) { + if (unlikely(x > bdi->stat_threshold || x < -bdi->stat_threshold)) { bdi_stat_add(x, bdi, item); x = 0; } @@ -144,8 +163,8 @@ void __inc_bdi_stat(struct backing_dev_i (*p)++; - if (unlikely(*p > pcd->stat_threshold)) { - int overstep = pcd->stat_threshold / 2; + if (unlikely(*p > bdi->stat_threshold)) { + int overstep = bdi->stat_threshold / 2; bdi_stat_add(*p + overstep, bdi, item); *p = -overstep; @@ -170,8 +189,8 @@ void __dec_bdi_stat(struct backing_dev_i (*p)--; - if (unlikely(*p < -pcd->stat_threshold)) { - int overstep = pcd->stat_threshold / 2; + if (unlikely(*p < -bdi->stat_threshold)) { + int overstep = bdi->stat_threshold / 2; bdi_stat_add(*p - overstep, bdi, item); *p = overstep; Index: linux-2.6/mm/page-writeback.c === --- linux-2.6.orig/mm/page-writeback.c +++ linux-2.6/mm/page-writeback.c @@ -341,14 +341,25 @@ static void balance_dirty_pa
[PATCH 04/12] mm: count writeback pages per BDI
Count per BDI writeback pages. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- include/linux/backing-dev.h |1 + mm/page-writeback.c |8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) Index: linux-2.6/mm/page-writeback.c === --- linux-2.6.orig/mm/page-writeback.c +++ linux-2.6/mm/page-writeback.c @@ -981,10 +981,12 @@ int test_clear_page_writeback(struct pag write_lock_irqsave(&mapping->tree_lock, flags); ret = TestClearPageWriteback(page); - if (ret) + if (ret) { radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_WRITEBACK); + __dec_bdi_stat(mapping->backing_dev_info, BDI_WRITEBACK); + } write_unlock_irqrestore(&mapping->tree_lock, flags); } else { ret = TestClearPageWriteback(page); @@ -1004,10 +1006,12 @@ int test_set_page_writeback(struct page write_lock_irqsave(&mapping->tree_lock, flags); ret = TestSetPageWriteback(page); - if (!ret) + if (!ret) { radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_WRITEBACK); + __inc_bdi_stat(mapping->backing_dev_info, BDI_WRITEBACK); + } if (!PageDirty(page)) radix_tree_tag_clear(&mapping->page_tree, page_index(page), Index: linux-2.6/include/linux/backing-dev.h === --- linux-2.6.orig/include/linux/backing-dev.h +++ linux-2.6/include/linux/backing-dev.h @@ -25,6 +25,7 @@ enum bdi_state { enum bdi_stat_item { BDI_DIRTY, + BDI_WRITEBACK, NR_BDI_STAT_ITEMS }; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 11/12] mm: accurate pageout congestion wait
Only do the congestion wait when we actually encountered congestion. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- include/linux/swap.h |1 + mm/page_io.c |9 + mm/vmscan.c | 25 - 3 files changed, 30 insertions(+), 5 deletions(-) Index: linux-2.6-mm/mm/vmscan.c === --- linux-2.6-mm.orig/mm/vmscan.c 2007-04-05 16:29:49.0 +0200 +++ linux-2.6-mm/mm/vmscan.c2007-04-05 16:35:36.0 +0200 @@ -70,6 +70,8 @@ struct scan_control { int all_unreclaimable; int order; + + int encountered_congestion; }; /* @@ -315,7 +317,8 @@ typedef enum { * pageout is called by shrink_page_list() for each dirty page. * Calls ->writepage(). */ -static pageout_t pageout(struct page *page, struct address_space *mapping) +static pageout_t pageout(struct page *page, struct address_space *mapping, + struct scan_control *sc) { /* * If the page is dirty, only perform writeback if that write @@ -357,6 +360,7 @@ static pageout_t pageout(struct page *pa if (clear_page_dirty_for_io(page)) { int res; + struct backing_dev_info *bdi; struct writeback_control wbc = { .sync_mode = WB_SYNC_NONE, .nr_to_write = SWAP_CLUSTER_MAX, @@ -366,6 +370,14 @@ static pageout_t pageout(struct page *pa .for_reclaim = 1, }; + if (mapping == &swapper_space) + bdi = swap_bdi(page); + else + bdi = mapping->backing_dev_info; + + if (bdi_congested(bdi, WRITE)) + sc->encountered_congestion = 1; + SetPageReclaim(page); res = mapping->a_ops->writepage(page, &wbc); if (res < 0) @@ -533,7 +545,7 @@ static unsigned long shrink_page_list(st goto keep_locked; /* Page is dirty, try to write it out here */ - switch(pageout(page, mapping)) { + switch(pageout(page, mapping, sc)) { case PAGE_KEEP: goto keep_locked; case PAGE_ACTIVATE: @@ -1141,6 +1153,7 @@ unsigned long try_to_free_pages(struct z for (priority = DEF_PRIORITY; priority >= 0; priority--) { sc.nr_scanned = 0; + sc.encountered_congestion = 0; if (!priority) disable_swap_token(); nr_reclaimed += shrink_zones(priority, zones, &sc); @@ -1169,7 +1182,7 @@ unsigned long try_to_free_pages(struct z } /* Take a nap, wait for some writeback to complete */ - if (sc.nr_scanned && priority < DEF_PRIORITY - 2) + if (sc.encountered_congestion) congestion_wait(WRITE, HZ/10); } /* top priority shrink_caches still had more to do? don't OOM, then */ @@ -1250,6 +1263,7 @@ loop_again: int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ unsigned long lru_pages = 0; + sc.encountered_congestion = 0; /* The swap token gets in the way of swapout... */ if (!priority) disable_swap_token(); @@ -1337,7 +1351,7 @@ loop_again: * OK, kswapd is getting into trouble. Take a nap, then take * another pass across the zones. */ - if (total_scanned && priority < DEF_PRIORITY - 2) + if (sc.encountered_congestion) congestion_wait(WRITE, HZ/10); /* @@ -1580,6 +1594,7 @@ unsigned long shrink_all_memory(unsigned unsigned long nr_to_scan = nr_pages - ret; sc.nr_scanned = 0; + sc.encountered_congestion = 0; ret += shrink_all_zones(nr_to_scan, prio, pass, &sc); if (ret >= nr_pages) goto out; @@ -1591,7 +1606,7 @@ unsigned long shrink_all_memory(unsigned if (ret >= nr_pages) goto out; - if (sc.nr_scanned && prio < DEF_PRIORITY - 2) + if (sc.encountered_congestion) congestion_wait(WRITE, HZ / 10); } } Index: linux-2.6-mm/include/linux/swap.h === --- linux-2.6-mm.orig/include/linux/swap.h 2007-04-05 16:24:02.0 +0200 +++ linux-2.6-mm/include/linux/swap.h 2007-04-05 16:35:36.0 +0200 @@ -220,6 +220,7 @@ extern void swap_unplug_io_fn(struct bac #ifdef CONFIG_SWAP /*
[PATCH 00/12] per device dirty throttling -v3
Against 2.6.21-rc5-mm4 without: per-backing_dev-dirty-and-writeback-page-accounting.patch This series implements BDI independent dirty limits and congestion control. This should solve several problems we currently have in this area: - mutual interference starvation (for any number of BDIs), and - deadlocks with stacked BDIs (loop and FUSE). All the fancy new congestion code has been compile and boot tested, but not much more. I'm posting to get feedback on the ideas. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/12] nfs: remove congestion_end()
Its redundant, clear_bdi_congested() already wakes the waiters. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- fs/nfs/write.c |4 +--- include/linux/backing-dev.h |1 - mm/backing-dev.c| 13 - 3 files changed, 1 insertion(+), 17 deletions(-) Index: linux-2.6-mm/fs/nfs/write.c === --- linux-2.6-mm.orig/fs/nfs/write.c2007-04-05 16:24:50.0 +0200 +++ linux-2.6-mm/fs/nfs/write.c 2007-04-05 16:25:04.0 +0200 @@ -235,10 +235,8 @@ static void nfs_end_page_writeback(struc struct nfs_server *nfss = NFS_SERVER(inode); end_page_writeback(page); - if (atomic_long_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) { + if (atomic_long_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) clear_bdi_congested(&nfss->backing_dev_info, WRITE); - congestion_end(WRITE); - } } /* Index: linux-2.6-mm/include/linux/backing-dev.h === --- linux-2.6-mm.orig/include/linux/backing-dev.h 2007-04-05 16:24:50.0 +0200 +++ linux-2.6-mm/include/linux/backing-dev.h2007-04-05 16:25:08.0 +0200 @@ -96,7 +96,6 @@ void clear_bdi_congested(struct backing_ void set_bdi_congested(struct backing_dev_info *bdi, int rw); long congestion_wait(int rw, long timeout); long congestion_wait_interruptible(int rw, long timeout); -void congestion_end(int rw); #define bdi_cap_writeback_dirty(bdi) \ (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK)) Index: linux-2.6-mm/mm/backing-dev.c === --- linux-2.6-mm.orig/mm/backing-dev.c 2007-04-05 16:24:50.0 +0200 +++ linux-2.6-mm/mm/backing-dev.c 2007-04-05 16:25:16.0 +0200 @@ -70,16 +70,3 @@ long congestion_wait_interruptible(int r return ret; } EXPORT_SYMBOL(congestion_wait_interruptible); - -/** - * congestion_end - wake up sleepers on a congested backing_dev_info - * @rw: READ or WRITE - */ -void congestion_end(int rw) -{ - wait_queue_head_t *wqh = &congestion_wqh[rw]; - - if (waitqueue_active(wqh)) - wake_up(wqh); -} -EXPORT_SYMBOL(congestion_end); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
creating daemons
hi all, i want run my program as a daemon..its like normal how to do that service squid start thanks - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
creating daemons
hi all, i want run my program as a daemon..its like normal how to do that service squid start thanks - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
crash recovery tool
hi all, I'm doing project in neutral linux kernel.if any file missing in the kernel, tool needs to find the error and recover automatically.any such tool is there?.advance thanks.. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.4 VM & swap question
Regarding to the discussion on the swap size, Recently, Rick van Riel posted a message that there is a bug related to "reclaiming" the swap, and said that it is on his TODO list. If I believe it, the current trouble we have regarding to the swap size is not because we do not have a sufficient size for the swap, but because there is a bug, although Linus advised us to assign 2 times the physical memory for the swap. I don't know. Anyway, I am trying to put an extra 4GB hard disk on an Alpha UP2000 right now. Regards, Hugh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.4.5-ac6 and 2.4.4-ac11 boot fails with APIC timer
> The message on the screen > > calibrating APIC timer . > CPU clock speed is 1395.7390MHz > ... host bus clock speed is 0. MHz > cpu: 0, clocks: 0, slic: 0 > > Then nothing. I had to push the reset button at this point. > ACPI and APM were disabled from the kernel config. > > This boot failure messages was obtained from > Pentium4 board GB-450(?) from Intel, NVIDIA M64 video. > Sound Blaster 128 PCI. Netgear PNIC fast ethernet > > The same kernel was able to boot up the other Pentium 4 board from > Gigabyte flawlessly. So, it depends on the motherboard manufacturers. > > Regards to all. > > G. Hugh Song Replying to my own message: When I chose "No" to "APIC support on uniprocessors", the above error message disappeared and the machine booted up OK with 2.4.5-ac13. Please refer to the following diff: diff .config.old .config 63,65c63 < CONFIG_X86_UP_APIC=y < # CONFIG_X86_UP_IOAPIC is not set < CONFIG_X86_LOCAL_APIC=y --- > # CONFIG_X86_UP_APIC is not set I think that APIC thing was defined by Intel themselves. They should have implemented it the best. How much penalty do I pay by not choosing "yes" to "APIC support on uniprocessors"? Best regards, G. Hugh Song - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.4.5pre2aa1 panic during boot
The attached .config file created a working kernel for 2.4.2. Now, with the one compiled from 2.4.5pre2aa1, it only gives kernel panic during boot with the following message: Kernel panic: Attempted to kill the idel task In idle task -- not syncing This happened on LX164 with AlphaBIOS running SuSE-7.0, gcc-2.95.2-136. Almost identical .config file created a working kernel for UP2000 SMP. So, what is wrong with LX164? Should I dump this old ALpha now? Andrea told us that he will not care for anything compiled with gcc-2.95 or version lower than that. However, it seems that this kernel panic has anything to do with gcc-2.95. Anyway, gcc-2.95 is still the official release of gcc. Even SuSE-7.1 has this version only. I wish SuSE puts something higher than 2.95 in their web site somewhere. Best regards, Hugh # # Automatically generated make config: don't edit # CONFIG_ALPHA=y # CONFIG_UID16 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # # Loadable module support # CONFIG_MODULES=y CONFIG_MODVERSIONS=y CONFIG_KMOD=y # # General setup # # CONFIG_ALPHA_GENERIC is not set # CONFIG_ALPHA_ALCOR is not set # CONFIG_ALPHA_XL is not set # CONFIG_ALPHA_BOOK1 is not set # CONFIG_ALPHA_AVANTI is not set # CONFIG_ALPHA_CABRIOLET is not set # CONFIG_ALPHA_DP264 is not set # CONFIG_ALPHA_EB164 is not set # CONFIG_ALPHA_EB64P is not set # CONFIG_ALPHA_EB66 is not set # CONFIG_ALPHA_EB66P is not set # CONFIG_ALPHA_EIGER is not set # CONFIG_ALPHA_JENSEN is not set CONFIG_ALPHA_LX164=y # CONFIG_ALPHA_MIATA is not set # CONFIG_ALPHA_MIKASA is not set # CONFIG_ALPHA_NAUTILUS is not set # CONFIG_ALPHA_NONAME is not set # CONFIG_ALPHA_NORITAKE is not set # CONFIG_ALPHA_PC164 is not set # CONFIG_ALPHA_P2K is not set # CONFIG_ALPHA_RAWHIDE is not set # CONFIG_ALPHA_RUFFIAN is not set # CONFIG_ALPHA_RX164 is not set # CONFIG_ALPHA_SX164 is not set # CONFIG_ALPHA_SABLE is not set # CONFIG_ALPHA_TAKARA is not set # CONFIG_ALPHA_TITAN is not set # CONFIG_ALPHA_WILDFIRE is not set CONFIG_ISA=y CONFIG_EISA=y # CONFIG_SBUS is not set # CONFIG_MCA is not set CONFIG_PCI=y CONFIG_ALPHA_EV5=y CONFIG_ALPHA_CIA=y CONFIG_ALPHA_PYXIS=y # CONFIG_ALPHA_SRM is not set CONFIG_DISCONTIGMEM=y CONFIG_NUMA=y CONFIG_NUMA_SCHED=y # CONFIG_ALPHA_LARGE_VMALLOC is not set CONFIG_PCI_NAMES=y # CONFIG_HOTPLUG is not set # CONFIG_PCMCIA is not set CONFIG_NET=y CONFIG_SYSVIPC=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_SYSCTL=y CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y # CONFIG_BINFMT_EM86 is not set # # Parallel port support # CONFIG_PARPORT=y CONFIG_PARPORT_PC=y CONFIG_PARPORT_PC_FIFO=y # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_AMIGA is not set # CONFIG_PARPORT_MFC3 is not set # CONFIG_PARPORT_ATARI is not set # CONFIG_PARPORT_SUNBPP is not set # CONFIG_PARPORT_OTHER is not set CONFIG_PARPORT_1284=y # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Plug and Play configuration # CONFIG_PNP=y CONFIG_ISAPNP=y # # Block devices # CONFIG_BLK_DEV_FD=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_RAM is not set # # Multi-device support (RAID and LVM) # CONFIG_MD=y # CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_LVM=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_NETLINK=y CONFIG_RTNETLINK=y CONFIG_NETLINK_DEV=y # CONFIG_NETFILTER is not set # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set # CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set # # # # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set # CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set CONFIG_NET_FASTROUTE=y # CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set # # ATA/IDE/MFM/RLL support # CONFIG_IDE=y # # IDE, ATA and ATAPI Block devices # CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDEDISK_VENDOR is not set # CONFIG_BLK_DEV_COMMERIAL is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # # IDE chipset support/bugfixes # # CONFIG_BLK_DEV_CMD640 is not set # CONFIG_BLK_DEV_ISAPNP is not set #
Re: 3c590 vs. tulip
Andi Kleen ([EMAIL PROTECTED]) wrote > >On Fri, May 11, 2001 at 09:27:29AM -0400, Dan Mann wrote: >> I was just wondering if anybody had an idea which nic card might be a better >> choice for me; I have a pci 3c590 and a pci smc that uses the tulip driver. >> I don't have the card number for the smc with me handy, however I know both >> cards were manufactured in 1995. Is either card/driver a better choice for >> a mildly used file server (I am running 2.4.4 Linus)? > >As of 2.4.4 newer 3c90x (I guess you mean that, 3c59x should be mostly >extinct now) are a better choice because they support zero copy TX and >hardware checksumming while tulip does not. On http://www.scyld.com/expert/100mbps.html Venerable Don Becker wrote: > > DEC "Tulip" 21140/21142/21143 > Bus master, with same clean and fast packet interface of the 10Mbs > 21040, but a with different serial subsubsystem. It's used on the SMC > PCI EtherPower and most other 100Mbs cards. > A limitation of the current chips is that packets may only be received > into long-aligned buffers, which results in the IP header being > misaligned. For some word-oriented architectures, such as Digital's > own Alpha, this results in pointless copying. Programming info: The > datasheet is readily available online or from DEC. > Driver: I've written a Linux device driver that works with most > Tulip-based adapter. > Multicast support: The DEC Tulip chip has the best design of the > commodity chips. Its reception filter has several modes. In addition to > the common hardware multicast hash filter mode (with 512 entries, > rather than the common 64 entries), it has a mode where it can > accept any of 16 specific addresses, either multicast or physical. > Large packet support: The tulip chips can be configured to extend > the normal Tx jabber clock from 1.6-2.0 msec. (2048 to 2560 > transmitted octets) to 26-33 msec. Similarly, the "Rx watchdog" > timer can be disabled so that any length packet may be received. > (Untested.) > 3Com Vortex > Uses primarily a programmed-I/O interface similar to the 3c509, but > has a limited bus master capability. The chip is used only on the > 3c595 board. > Programming info: The programming manual is readily available > from 3Com. > Driver: I've written a Linux device driver for the 3c590 and 3c595. > Large packet support: The Vortex chips can be explicitly > configured to support 4.5K (FDDI-sized) packets. > Multicast support: The 3Com Vortex chips, like the rest of the > EtherLink III series, have no hardware multicast filter. Multicast > reception is enabled by a "receive all multicast packets" bit. > 3Com Boomerang > An update to the 3Com Vortex, this chip primarily uses a full > descriptor-based bus-master interface, similar to the AMD, Tulip > and Speedo3 chips. The programmed-I/O interface of the Vortex is > currently retained, but is scheduled to be deleted in future chip > revisions. This chip is used only on the 3Com EtherLink III XL > boards, the 3c900 series. > Programming info: The programming manual will soon be available > from 3Com. > Driver: I've enhanced the Linux Vortex device driver to use this > chip in PIO mode. A new driver supporting the full-bus-master > mode is in progress. > Large packet support: Like the Vortex chip, the Boomerang can be > explicitly configured to support 4.5K (FDDI-sized) packets. > Multicast support: This chip, like the rest of the EtherLink III > series, have no hardware multicast filter. Multicast reception is > enabled by a "receive all multicast packets" bit. > Intel Speedo-3 i82557/i82558 > The chip has an interface similar to the other Intel network chips, > with a direct PCI interface and the "SCB" implemented as registers > visible in I/O and memory space. The chip is used on the Intel > EtherExpress/Pro100B and 100+ boards, several OEM boards, and a > custom board from Allied Telesyn. > The i82558 chip integrates a i82555 transceiver, adds flow control, > has improved firmware, and adds power > management/wake-up-packet control. Programming info: > Technical details are very difficult to obtain, and usually requires > signing a NDA with Intel. > Driver: I've written a Linux device driver for the i82557 that > demonstrates one way to use the Speedo-3. > Large packet support: Unknown. > Multicast support: The Intel EtherExpress PCI Pro 100B has a > hardware multicast filter, but it illustrates characteristic Intel > quirkiness and difficulty of use. A set-multicast-list command is > queued on the Tx packet queue. The chip processes the list of > multicast addresses to accept, and fills in an internal hash table. > During the (presumably short) period that the set-multicast-list > command is b
correctable ECC error
On UP2000 SMP with two 21264 CPU's running 2.4.5pre1aa1 and 2.2.19aa1, I am getting the following message: === May 12 07:02:09 norma kernel: TSUNAMI machine check: vector=0x630 pc=0x20001170070 code=0x10086 May 12 07:02:09 norma kernel: machine check type: correctable ECC error (retryable) May 12 07:02:16 norma init: PANIC: segmentation violation! sleeping for 30 seconds. May 12 07:02:46 norma init: PANIC: segmentation violation! sleeping for 30 seconds. May 12 07:03:46 norma last message repeated 2 times May 12 07:04:46 norma last message repeated 2 times May 12 07:05:46 norma last message repeated 2 times May 12 07:06:46 norma last message repeated 2 times May 12 07:07:46 norma last message repeated 2 times May 12 07:08:46 norma last message repeated 2 times May 12 07:09:46 norma last message repeated 2 times May 12 07:10:46 norma last message repeated 2 times May 12 07:11:47 norma last message repeated 2 times May 12 07:12:47 norma last message repeated 2 times May 12 07:13:47 norma last message repeated 2 times May 12 07:14:47 norma last message repeated 2 times May 12 07:15:47 norma last message repeated 2 times May 12 07:16:47 norma last message repeated 2 times May 12 07:17:47 norma last message repeated 2 times May 12 07:18:47 norma last message repeated 2 times May 12 07:19:47 norma last message repeated 2 times May 12 07:20:47 norma last message repeated 2 times May 12 07:21:47 norma last message repeated 2 times May 12 07:22:47 norma last message repeated 2 times May 12 07:23:47 norma last message repeated 2 times May 12 07:24:47 norma last message repeated 2 times May 12 07:25:47 norma last message repeated 2 times May 12 07:26:47 norma last message repeated 2 times May 12 07:27:47 norma last message repeated 2 times May 12 07:28:47 norma last message repeated 2 times May 12 07:29:47 norma last message repeated 2 times May 12 07:30:47 norma last message repeated 2 times May 12 07:31:47 norma last message repeated 2 times May 12 07:32:47 norma last message repeated 2 times May 12 07:33:47 norma last message repeated 2 times May 12 07:34:47 norma last message repeated 2 times May 12 07:35:47 norma last message repeated 2 times May 12 07:36:47 norma last message repeated 2 times May 12 07:37:47 norma last message repeated 2 times May 12 07:38:47 norma last message repeated 2 times May 12 07:39:47 norma last message repeated 2 times May 12 07:40:47 norma last message repeated 2 times May 12 07:41:47 norma last message repeated 2 times May 12 07:42:47 norma last message repeated 2 times May 12 07:43:47 norma last message repeated 2 times May 12 07:44:47 norma last message repeated 2 times May 12 07:45:47 norma last message repeated 2 times May 12 07:46:47 norma last message repeated 2 times May 12 07:47:47 norma last message repeated 2 times May 12 07:48:47 norma last message repeated 2 times May 12 07:49:48 norma last message repeated 2 times May 12 07:50:48 norma last message repeated 2 times May 12 07:51:48 norma last message repeated 2 times May 12 07:52:48 norma last message repeated 2 times May 12 07:53:48 norma last message repeated 2 times May 12 07:54:48 norma last message repeated 2 times May 12 07:55:48 norma last message repeated 2 times May 12 07:56:48 norma last message repeated 2 times May 12 07:57:48 norma last message repeated 2 times May 12 07:58:48 norma last message repeated 2 times May 12 07:59:48 norma last message repeated 2 times May 12 08:00:48 norma last message repeated 2 times May 12 08:01:48 norma last message repeated 2 times May 12 08:02:48 norma last message repeated 2 times May 12 08:03:48 norma last message repeated 2 times May 12 08:04:48 norma last message repeated 2 times May 12 08:05:48 norma last message repeated 2 times May 12 08:06:48 norma last message repeated 2 times May 12 08:07:48 norma last message repeated 2 times May 12 08:08:48 norma last message repeated 2 times May 12 08:09:48 norma last message repeated 2 times May 12 08:10:48 norma last message repeated 2 times May 12 08:11:48 norma last message repeated 2 times May 12 08:12:48 norma last message repeated 2 times May 12 08:13:48 norma last message repeated 2 times May 12 08:14:48 norma last message repeated 2 times May 12 08:15:48 norma last message repeated 2 times May 12 08:16:48 norma last message repeated 2 times May 12 08:17:48 norma last message repeated 2 times May 12 08:18:48 norma last message repeated 2 times May 12 08:19:48 norma last message repeated 2 times May 12 08:20:48 norma last message repeated 2 times May 12 08:21:48 norma last message repeated 2 times == Is one of my memory modules failiing? BTW, it did not sleep when I used 2.4.2. The message with 2.4.2 was like this: May 5 00:23:43 norma kernel: TSUNAMI machine check: vector=0x630 pc=0x20001174e7c code=0x10086 May 5 00:23:44 norma kernel: machine check t
Re: 2.4.4 Sound corruption
Steven Walter wrote: > I'm running esound 0.2.17 from Debian 2.2. Can someone who's having no > problems with sound on 2.4.4 give a little info about their setup? esd works for me with any 2.4.x including 2.4.4 Pentium III, BE6, ES1370, devfs, Xfree-4.0.3/GNOME esound-0.2.22. Timidity is fine as well. What else ? Pierre -- Pierre Rousselet <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: No 100 HZ timer !
Mikulas Patocka wrote: > BTW. Why we need to redesign timers at all? The cost of timer interrupt > each 1/100 second is nearly zero (1000 instances on S/390 VM is not common > case - it is not reasonable to degradate performance of timers because of > this). > > Timers more precise than 100HZ aren't probably needed - as MIN_RTO is 0.2s > and MIN_DELACK is 0.04s, TCP would hardly benefit from them. > well, I can think dozens of real time applications off the top of my head that need beter than 1ms timing resolution (think sensor fusion) 1000 clock interrupts/sec is wasteful when what you need is 1 very precisely timed interrupt. why do we redesign anything? to make it better. TCP is not the only thing in the system. if you are in love with the existing system, it shouldn't be hard to make it a config option. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
unresolved symbol queue_task !
Hello sirs ; A part of my source is like this : static struct tq_struct Task = { /* Some inits */ }; queue_task(&Task,&tq_timer); With the line #include When ever I compile my source as a module ,insmod tells me "Unresolved symbole queue_task" .It seems that I have problem with __inline__ functions . How sholud I write my source ... What's the problem with inline functions ? Regards ica >8{ _ Get Your Free Email from http://www.888.nu/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Panic] 2.4.2ac22
Hi, Yet another one. This time with all the traceback entries... Ed ksymoops 2.3.7 on i586 2.4.2-ac22. Options used -V (default) -k 20010323183444.ksyms (specified) -l 20010323183444.modules (specified) -o /lib/modules/2.4.2-ac22/ (default) -m /boot/System.map-2.4.2-ac22 (default) Warning (compare_maps): ksyms_base symbol __VERSIONED_SYMBOL(shmem_file_setup) not found in System.map. Ignoring ksyms_base entry Warning (compare_maps): snd symbol pm_register not found in /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o. Ignoring /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o entry Warning (compare_maps): snd symbol pm_send not found in /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o. Ignoring /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o entry Warning (compare_maps): snd symbol pm_unregister not found in /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o. Ignoring /usr/lib/alsa-modules/2.4.2-ac22/0.5/snd.o entry 8139too Fast Ethernet driver 0.9.15 loaded Unable to handle kernel paging request at virtual address ef1f c01b2b53 *pde = Oops: CPU:0 EIP:0010:[] Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010202 eax: d1ce1b00 ebx: ef1f ecx: edx: ef1f esi: c8fd25a0 edi: d1ce1ba0 ebp: 0060 esp: c0227de0 ds: 0018 es: 0018 ss: 0018 Process swapper (pid: 0, stackpage=c0227000) Stack: 0100 c01b2bfb c8fd25a0 0100 c8fd25a0 c01b310a c8fd25a0 c8fd25a0 d3eae800 d1a122a0 d3eae800 c01b589a c8fd25a0 0002 c6b4b160 c8fd25a0 c01b8973 c8fd25a0 c8fd25a0 0004 c01c268c c01c2705 c8fd25a0 Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Code: 8b 1b 8b 42 70 83 f8 01 74 0a ff 4a 70 0f 94 c0 84 c0 74 09 >>EIP; c01b2b53<= Trace; c01b2bfb Trace; c01b310a Trace; c01b589a Trace; c01b8973 Trace; c01c268c Trace; c01c2705 Trace; c01ba937 Trace; c01bff2c Trace; c01c2672 Trace; c01c268c Trace; c01bff7a Trace; c01ba937 Trace; c01bfed8 Trace; c01bff2c Trace; c01bf200 Trace; c01bf34f Trace; c01bf200 Trace; c01ba937 Trace; c01bf075 Trace; c01bf200 Trace; c01b5e2b Trace; c0117510 Trace; c010a172 Trace; c01071f0 Trace; c0108e80 Trace; c01071f0 Trace; c0107213 Trace; c0107277 Trace; c0105000 Trace; c0100191 Code; c01b2b53 <_EIP>: Code; c01b2b53<= 0: 8b 1b mov(%ebx),%ebx <= Code; c01b2b55 2: 8b 42 70 mov0x70(%edx),%eax Code; c01b2b58 5: 83 f8 01 cmp$0x1,%eax Code; c01b2b5b 8: 74 0a je 14 <_EIP+0x14> c01b2b67 Code; c01b2b5d a: ff 4a 70 decl 0x70(%edx) Code; c01b2b60 d: 0f 94 c0 sete %al Code; c01b2b63 10: 84 c0 test %al,%al Code; c01b2b65 12: 74 09 je 1d <_EIP+0x1d> c01b2b70 <0>Kernel panic: Aiee, killing interrupt handler! invalid operand: CPU:0 EIP:0010:[] EFLAGS: 00010282 eax: 0018 ebx: c0227bac ecx: c9da8000 edx: c0213a44 esi: c9226c60 edi: c0226000 ebp: c0227b98 esp: c0227b70 ds: 0018 es: 0018 ss: 0018 Process swapper (pid: 0, stackpage=c0227000) Stack: c01eab96 c0227bac c9226c60 c0226000 c01177a4 c0280a60 c0227bac c9226c60 Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Code: 0f 0b 8d 65 dc 5b 5e 5f c9 c3 90 55 89 e5 83 ec 10 57 56 53 >>EIP; c0111d7d<= Trace; c01177a4 <__run_task_queue+4c/68> Trace; c012daaa <__wait_on_buffer+6a/8c> Trace; d682f284 <[lvm-mod].bss.end+1f5f9/14f3d5> Trace; c0164bde Trace; d682f2b8 <[lvm-mod].bss.end+1f62d/14f3d5> Trace; d682f2ac <[lvm-mod].bss.end+1f621/14f3d5> Trace; c01685db Trace; d682f284 <[lvm-mod].bss.end+1f5f9/14f3d5> Trace; d68528a0 <[lvm-mod].bss.end+42c15/14f3d5> Trace; c016753d Trace; c0159185 Trace; c0131406 Trace; c012dcb7 Trace; c0187b9a Trace; c0187c24 Trace; c0113aae Trace; c011645b Trace; c0109329 Trace; c0111438 Trace; c02c Trace; d6ab4000 <[8139too]__module_parm_full_duplex+134e/33ae> Trace; c01bae03 Trace; c01b595e Trace; d6a08ab6 <[ipchains]ip_fw_check+4b6/59c> Trace; c0108f04 Trace; c01b2b53 Trace; c01b2bfb Trace; c01b310a Trace; c01b589a Trace; c01b8973 Trace; c01c268c Trace; c01c2705 Trace; c01ba937 Trace; c01bff2c Trace; c01c2672 Trace; c01c268c Trace; c01bff7a Trace; c01ba937 Trace; c01bfed8 Trace; c01bff2c Trace; c01bf200 Trace; c01bf34f Trace; c01bf200 Trace; c01ba937 Trace; c01bf075 Trace; c01bf200 Trace; c01b5e2b Trace; c0117510 Trace; c010a172 Trace; c01071f0 Trace; c0108e80 Trace; c01071f0 Trace; c0107213 Trace; c0107277 Trace; c0105000 Trace; c0100191 Code; c0111d7d <_
[Fwd: Problem at Kernel Configuring!!!!]
Hi, I am sending an output the last part kernel configuring. I have read and applied "Changes" which went successful. In configuring kernel, I did make xconfig, make dep, and make clean which was successful. But when I did a "make bzImage" that when I ran into problems. "Make bzImage" stop with an error. I am using Athlon 700mg/hz, 15g HD. I am running kernel 2.2.16 and distributor is Redhat. Could this be a bug in the new 2.4.2? My email address is [EMAIL PROTECTED] Thanks, Jonathan Ellison gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=athlon-c -o init/main.o init/main.c In file included from /usr/src/linux/include/linux/irq.h:58, from /usr/src/linux/include/asm/hardirq.h:7, from /usr/src/linux/include/linux/interrupt.h:46, from /usr/src/linux/include/asm/string.h:297, from /usr/src/linux/include/linux/string.h:22, from /usr/src/linux/include/linux/fs.h:24, from /usr/src/linux/include/linux/capability.h:18, from /usr/src/linux/include/linux/binfmts.h:6, from /usr/src/linux/include/linux/sched.h:10, from /usr/src/linux/include/linux/mm.h:5, from /usr/src/linux/include/linux/slab.h:15, from /usr/src/linux/include/linux/proc_fs.h:6, from init/main.c:16: /usr/src/linux/include/asm/hw_irq.h: In function `x86_do_profile': /usr/src/linux/include/asm/hw_irq.h:198: `current' undeclared (first use in this function) /usr/src/linux/include/asm/hw_irq.h:198: (Each undeclared identifier is reported only once /usr/src/linux/include/asm/hw_irq.h:198: for each function it appears in.) In file included from /usr/src/linux/include/asm/string.h:297, from /usr/src/linux/include/linux/string.h:22, from /usr/src/linux/include/linux/fs.h:24, from /usr/src/linux/include/linux/capability.h:18, from /usr/src/linux/include/linux/binfmts.h:6, from /usr/src/linux/include/linux/sched.h:10, from /usr/src/linux/include/linux/mm.h:5, from /usr/src/linux/include/linux/slab.h:15, from /usr/src/linux/include/linux/proc_fs.h:6, from init/main.c:16: /usr/src/linux/include/linux/interrupt.h: In function `raise_softirq': /usr/src/linux/include/linux/interrupt.h:89: `current' undeclared (first use in this function) /usr/src/linux/include/linux/interrupt.h: In function `tasklet_schedule': /usr/src/linux/include/linux/interrupt.h:160: `current' undeclared (first use in this function) /usr/src/linux/include/linux/interrupt.h: In function `tasklet_hi_schedule': /usr/src/linux/include/linux/interrupt.h:174: `current' undeclared (first use in this function) In file included from /usr/src/linux/include/linux/string.h:22, from /usr/src/linux/include/linux/fs.h:24, from /usr/src/linux/include/linux/capability.h:18, from /usr/src/linux/include/linux/binfmts.h:6, from /usr/src/linux/include/linux/sched.h:10, from /usr/src/linux/include/linux/mm.h:5, from /usr/src/linux/include/linux/slab.h:15, from /usr/src/linux/include/linux/proc_fs.h:6, from init/main.c:16: /usr/src/linux/include/asm/string.h: In function `__constant_memcpy3d': /usr/src/linux/include/asm/string.h:305: `current' undeclared (first use in this function) /usr/src/linux/include/asm/string.h: In function `__memcpy3d': /usr/src/linux/include/asm/string.h:312: `current' undeclared (first use in this function) In file included from /usr/src/linux/include/linux/raid/md.h:51, from init/main.c:25: /usr/src/linux/include/linux/raid/md_k.h: In function `pers_to_level': /usr/src/linux/include/linux/raid/md_k.h:39: warning: control reaches end of non-void function make: *** [init/main.o] Error 1 gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=athlon-c -o init/main.o init/main.c In file included from /usr/src/linux/include/linux/irq.h:58, from /usr/src/linux/include/asm/hardirq.h:7, from /usr/src/linux/include/linux/interrupt.h:46, from /usr/src/linux/include/asm/string.h:297, from /usr/src/linux/include/linux/string.h:22, from /usr/src/linux/include/linux/fs.h:24, from /usr/src/linux/include/linux/capability.h:18, from /usr/src/linux/include/linux/binfmts.h:6, from /usr/src/linux/include/linux/sched.h:10, from /usr/src/linux/include/linux/mm.h:5, from /usr/src/linux/include/linux/slab.h
a bug report for 2.4.2 kernel
This bug appeared when I attempted to do "make modules". The "make bzImage" was successful. I also attached the .config file. Ko-Jen Shih gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o truncate.o truncate.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o util.o util.c rm -f ufs.o ld -m elf_i386 -r -o ufs.o balloc.o cylinder.o dir.o file.o ialloc.o inode.o namei.o super.o symlink.o truncate.o util.o make[2]: Leaving directory `/home/root/linux-2.4.2/linux/fs/ufs' make -C umsdos modules make[2]: Entering directory `/home/root/linux-2.4.2/linux/fs/umsdos' gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o dir.o dir.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o inode.o inode.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o ioctl.o ioctl.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o mangle.o mangle.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o namei.o namei.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o rdir.o rdir.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o emd.o emd.c rm -f umsdos.o ld -m elf_i386 -r -o umsdos.o dir.o inode.o ioctl.o mangle.o namei.o rdir.o emd.o make[2]: Leaving directory `/home/root/linux-2.4.2/linux/fs/umsdos' make -C vfat modules make[2]: Entering directory `/home/root/linux-2.4.2/linux/fs/vfat' gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o namei.o namei.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c vfatfs_syms.c rm -f vfat.o ld -m elf_i386 -r -o vfat.o namei.o vfatfs_syms.o make[2]: Leaving directory `/home/root/linux-2.4.2/linux/fs/vfat' make[1]: Leaving directory `/home/root/linux-2.4.2/linux/fs' make -C net CFLAGS="-D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h" MAKING_MODULES=1 modules make[1]: Entering directory `/home/root/linux-2.4.2/linux/net' make -C appletalk modules make[2]: Entering directory `/home/root/linux-2.4.2/linux/net/appletalk' gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /home/root/linux-2.4.2/linux/include/linux/modversions.h -c -o aarp.o aarp.c gcc -D__KERNEL__ -I/home/root/linux-2.4.2/linux/include -Wall -Wstrict-proto
what is RAW device? can I use it for my root partition?
anyone know? someone tell me that are super fast and stable system in HD, How can I make it? please tell me if you know, Thanks - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
need to suggest a good FS:
hey all, trouble again anyone can suggest some good FS that can install linux? exclude reiserfs, ext2, ext3, DOS FAT..etc just need non-normal or non-popular FS, any suggestion? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
patch for mini-pci ethernet card
Hi, I have a HP Pavilon 5290 laptop. It has a a mini-pci modem/ethernet combo integrated card. Searching in the Internet I found a patch for the ethernet to work with the tulip driver for kernel 2.2.x series, However, I found no patch for the 2.4.x kernel series, so I made one. Here is what /proc/pci detects as the ethernet card. Bus 0, device 16, function 0: Ethernet controller: PCI device 1113:1216 (Accton Technology Corporation) (rev 17). IRQ 11. Master Capable. Latency=64. Min Gnt=255.Max Lat=255. I/O at 0x1c00 [0x1cff]. Non-prefetchable 32 bit memory at 0xe800 [0xe80003ff]. This patch merely adds the configuration for that card in the tulip driver tables. I made this patch against kernel 2.4.1 and it works fine on my laptop. Apply this patch against linux/drivers/net/tulip/tulip_core.c Anyone with a similar laptop please test it and see if it works for you My name is Paul Pacheco, email: [EMAIL PROTECTED] So, Here is the patch: --- tulip_core.c.orig Fri Feb 16 14:30:38 2001 +++ tulip_core.cFri Feb 16 14:47:54 2001 @@ -150,6 +150,9 @@ { "Davicom DM9102/DM9102A", 128, 0x0001ebef, HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI, tulip_timer }, + { "EN2242 tulip work-alike", 128, 0x0801fbff, +HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI | HAS_NWAY, +t21142_timer }, {0}, }; @@ -177,6 +180,7 @@ { 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, { 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, { 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 }, +{ 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, {0, } }; MODULE_DEVICE_TABLE(pci, tulip_pci_tbl); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.4.1 oops.
One-line Summary: Denied services on the machine. Lack of responsiveness Detailed Summary: Server remained responsive but did not provide service. I was able to ping the machine and telnet to open ports but no data was sent back on these open ports. As far as current connections were concerned, i was not able to break out of my current process but i was able to send data (enter, etc). Keywords: Kernel, memory Kernel version: Linux version 2.4.1 ([EMAIL PROTECTED]) (gcc version 2.95.2 2220 (Debian GNU/Linux)) #1 Sat Feb 3 12:57:48 CST 2001 Trigger: unsure. Environment: ver_linux output: -- Versions installed: (if some fields are empty or look -- unusual then possibly you have very old versions) Linux crazy.hick.org 2.4.1 #1 Sat Feb 3 12:57:48 CST 2001 i586 unknown Kernel modules 2.1.85 Gnu C 2.95.2 Gnu Make 3.79.1 Binutils 2.9.5.0.16 Linux C Library2.2.1 Dynamic linker ldd (GNU libc) 2.2.1 Linux C++ Library 2.7.2 Procps 2.0.2 Mount 2.7l Net-tools 2.01 Console-tools 0.2.1 Sh-utils 1.16 Modules Loaded CPU Information: processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping: 12 cpu MHz : 350.807 cache size : 64 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr bogomips: 699.59 Module information: No modules. IO Ports and IO mem: -001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 02f8-02ff : serial(set) 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(set) 0cf8-0cff : PCI conf1 5000-50ff : VIA Technologies, Inc. VT82C586B ACPI d000-dfff : PCI Bus #01 e000-e00f : VIA Technologies, Inc. Bus Master IDE e400-e41f : VIA Technologies, Inc. UHCI USB e400-e41f : usb-uhci e800-e87f : 3Com Corporation 3c905B 100BaseTX [Cyclone] e800-e87f : eth0 -0009fbff : System RAM 0009fc00-0009 : System RAM 000a-000b : Video RAM area 000c-000c7fff : Video ROM 000f-000f : System ROM 0010-05ff : System RAM 0010-002396b1 : Kernel code 002396b2-002aa417 : Kernel data e000-e3ff : VIA Technologies, Inc. VT82C597 [Apollo VP3] e500-e57f : 3Com Corporation 3c905B 100BaseTX [Cyclone] - : reserved PCI information: 00:00.0 Host bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3] (rev 04) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- 00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3 AGP] (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B- 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C586/A/B PCI-to-ISA [Apollo VP] (rev 47) Subsystem: VIA Technologies, Inc. MVP3 ISA Bridge Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- , size=5194, class=0, nrcpts=1, msgid=<471ADE9820DCD411A46 E00B0D079F2830AB1E1@Xnetexch>, proto=ESMTP, daemon=MTA, relay=lists.securityfocus.com [66.38.151.7] Feb 9 10:16:30 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 12 Feb 9 10:16:30 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 12 Feb 9 10:16:45 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 12 Feb 9 10:16:45 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 12 Feb 9 10:17:00 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 13 Feb 9 10:17:00 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 13 Feb 9 10:17:15 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 13 Feb 9 10:17:15 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 13 Feb 9 10:17:30 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 14 Feb 9 10:17:30 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 14 Feb 9 10:17:45 crazy sendmail[127]: rejecting connections on daemon MTA: load average: 14 Feb 9 10:17:45 crazy sendmail[127]: rejecting connections on daemon MSA: load average: 14 Feb 9 10:18:00 crazy sendmail[1
PROBLEM: 2.4.1-pre7 hard freeze
PROBLEM: 2.4.1-pre7 hard freeze [1.] One line summary of the problem: Hard freeze [2.] Full description of the problem/report: Hard freeze while working on the console. 2.2.18 runs without any problem on this computer. [3.] Keywords (i.e., modules, networking, kernel): kernel [4.] Kernel version (from /proc/version): Linux version 2.4.1-pre7 (root@olibox) (gcc version 2.95.2 19991024 (release)) #3 Tue Jan 16 20:11:10 CET 2001 [5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt) no Oops ... [6.] A small shell script or example program which triggers the problem (if possible) none [7.] Environment [7.1.] Software (add the output of the ver_linux script here) -- Versions installed: (if some fields are empty or look -- unusual then possibly you have very old versions) Linux olibox 2.4.1-pre7 #3 Tue Jan 16 20:11:10 CET 2001 i686 unknown Kernel modules 2.3.20 Gnu C 2.95.2 Gnu Make 3.79.1 Binutils 2.9.5.0.24 Linux C Libraryx 1 root root 4071014 Dec 30 13:22 /lib/libc.so.6 Dynamic linker ldd (GNU libc) 2.1.3 Procps 2.0.6 Mount 2.10m Net-tools 1.56 Kbd0.99 Sh-utils 2.0 Modules Loaded epic100 nls_iso8859-1 [7.2.] Processor information (from /proc/cpuinfo): processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 7 model name : Pentium III (Katmai) stepping: 3 cpu MHz : 448.831 cache size : 512 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips: 894.56 [7.3.] Module information (from /proc/modules): epic10014294 1 (autoclean) nls_iso8859-1 3536 3 (autoclean) [7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem) -001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 02f8-02ff : serial(auto) 0376-0376 : ide1 0378-037a : parport0 037b-037f : parport0 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0778-077a : parport0 0cf8-0cff : PCI conf1 e000-e00f : VIA Technologies, Inc. Bus Master IDE e000-e007 : ide0 e008-e00f : ide1 e800-e8ff : Standard Microsystems Corp [SMC] 83C170QF e800-e8ff : eth0 ec00-ec3f : Ensoniq ES1371 [AudioPCI-97] ec00-ec3f : es1371 -0009efff : System RAM 000a-000b : Video RAM area 000c-000c7fff : Video ROM 000f-000f : System ROM 0010-0fff : System RAM 0010-00243ced : Kernel code 00243cee-0034448b : Kernel data d800-dbff : VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] dc00-ddff : PCI Bus #01 dc00-dcff : nVidia Corporation Riva TnT2 [NV5] de00-dfff : PCI Bus #01 de00-dfff : nVidia Corporation Riva TnT2 [NV5] e100-e1000fff : Standard Microsystems Corp [SMC] 83C170QF e100-e1000fff : eth0 [7.5.] PCI information ('lspci -vvv' as root) 00:00.0 Host bridge: VIA Technologies, Inc. VT82C691 [Apollo PRO] (rev 06) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- 00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3 AGP] (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B- 00:07.0 ISA bridge: VIA Technologies, Inc. VT82C596 ISA [Apollo PRO] (rev 07) Subsystem: VIA Technologies, Inc. VT82C596/A/B PCI to ISA Bridge Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=64K] Capabilities: [60] Power Management version 1 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [44] AGP version 2.0 Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2 Command: RQ=0 SBA- AGP- 64bit- FW- Rate= 00:00.0 Host bridge: VIA Technologies, Inc. VT82C691 [Apollo PRO] (rev 06) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- 0
Re: National Semiconductor DP83815 ethernet driver?
>From searching Google, I know some sort of driver exists. In July, Adam J. >Richter ([EMAIL PROTECTED]) posted a 2.2.16 driver he obtained from Dave >Gotwisner at Wyse Technologies. And Tim Hockin mentioned that he was using >an NSC driver, but had made some minor modifications. This one has a very murky past. Adam & I have both received the same driver from within NatSemi, which turned out to be a rehash of the driver originally written by Donald Becker (with his name and the GPL license removed...). It should be noted that this wasn't "written" by NatSemi themselves, but by a company called TeamF1. Since then Donald's original driver (natsemi.c) has been folded into the 2.4 kernel, and I can happily report works well with 2.2 as well. It's certainly a lot better than the dp83815.c program, which I found had the tendency to hang the machine completely in high traffic (well, if you count ftping from a host on the same 10Mb half duplex network as high load ;). john - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Build failure in 2.2.18
I've just patched and reconfigured to 2.2.18 (from 2.2.17 on an i686-linux-gnu[2.2]). make bzImage fails with: make[1]: Leaving directory `/usr/src/linux-2.2.18/arch/i386/lib' cc -D__KERNEL__ -I/usr/src/linux/include -E -C -P -I/usr/src/linux/include -imacros /usr/src/linux/include/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \ --start-group \ arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \ fs/filesystems.a \ net/network.a \ drivers/block/block.a drivers/char/char.o drivers/misc/misc.a drivers/net/net.a drivers/cdrom/cdrom.a drivers/pci/pci.a drivers/pnp/pnp.a drivers/video/video.a \ /usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a /usr/src/linux/arch/i386/lib/lib.a \ --end-group \ -o vmlinux ld:/usr/src/linux/arch/i386/vmlinux.lds:73: parse error make: *** [vmlinux] Error 1 I've appended vmlinux.lds below. David P.S. I don't subscribe to this list, so please CC me directly. -- /* ld script to make i386 Linux kernel * Written by Martin Mares <[EMAIL PROTECTED]>; */ OUTPUT_FORMAT ( "elf32-i386" , "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(_start) SECTIONS { . = 0xC000 + 0x10; _text = .; /* Text and read-only data */ .text : { *(.text) *(.fixup) *(.gnu.warning) } = 0x9090 .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) } .kstrtab : { *(.kstrtab) } . = ALIGN(16); /* Exception table */ __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; __start___ksymtab = .; /* Kernel symbol table */ __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; _etext = .; /* End of text section */ . data : { /* Data */ *(.data) CONSTRUCTORS } _edata = .; /* End of data section */ . = ALIGN(8192); /* init_task */ .data.init_task : { *(.data.init_task) } . = ALIGN(4096); /* Init code and data */ __init_begin = .; .text.init : { *(.text.init) } .data.init : { *(.data.init) } . = ALIGN(16); /* __setup() commandline parameters */ __setup_start = .; .setup.init : { *(.setup.init) } __setup_end = .; __initcall_start = .; /* the init functions to be called */ .initcall.init : { *(.initcall.init) } __initcall_end = .; . = ALIGN(4096); __init_end = .; . = ALIGN(32); .data.cacheline_aligned : { *(.data.cacheline_aligned) } . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } __bss_start = .; /* BSS */ .bss : { *(.bss) } _end = . ; /* Stabs debugging sections. */ . stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.2.18-26 pre-patch has error
Alan, Saw the following in the 2.2.18 pre-patch when I attempted to apply it to a 2.2.17 kernel -- |diff -u --new-file --recursive --exclude-from /usr/src/exclude |v2.2.17/arch/i386/vmlinux.lds linux/arch/i386/vmlinux.lds |--- v2.2.17/arch/i386/vmlinux.lds Wed May 3 21:22:13 2000 |+++ linux/arch/i386/vmlinux.ldsSat Dec 9 21:23:21 2000 -- File to patch: Skip this patch? [y] 1 out of 1 hunk ignored Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.2.18-25 Video Sickness
Here is the .config file section for turning on the console drivers for 2.2.18-25 that causes the sickness with Xconfigurator. Jeff # # Console drivers # CONFIG_VGA_CONSOLE=y CONFIG_VIDEO_SELECT=y CONFIG_MDA_CONSOLE=m CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y CONFIG_FB_PM2=y # CONFIG_FB_PM2_FIFO_DISCONNECT is not set # CONFIG_FB_PM2_PCI is not set CONFIG_FB_ATY=y CONFIG_FB_VESA=y # CONFIG_FB_VGA16 is not set CONFIG_VIDEO_SELECT=y CONFIG_FB_MATROX=m CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y CONFIG_FB_MATROX_G100=y CONFIG_FB_MATROX_MULTIHEAD=y # CONFIG_FB_ATY128 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set CONFIG_FBCON_CFB8=y CONFIG_FBCON_CFB16=y CONFIG_FBCON_CFB24=y CONFIG_FBCON_CFB32=y # CONFIG_FBCON_FONTWIDTH8_ONLY is not set # CONFIG_FBCON_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Oops in 2.2.18 with pppd dial in server
Alan, I was able to reproduce this oops with a somewhat more reliable ksymoops (I was ready for this nasty bug this time). Looks like the problem is in the sockets code. See attached. Jeff ksymoops 0.7c on i686 2.2.18pre21. Options used EIP: 0010: [] Using defaults from ksymoops -t elf32-i386 -a i386 Call Trace: [] [] [] [] [] [] [] Warning (Oops_read): Code line not seen, dumping what data is available >>EIP; c013365d<= Trace; c014c43d Trace; c014cb15 Trace; c012d79a Trace; c012dda8 Trace; c014cb82 Trace; c014d7cb Trace; c010a038
Oops on 2.2.18-21(23) with pppd dial-in
I had backreved this system to 2.2.18-21 but I can reproduce this Oops on both 2.2.18-21 and 2.2.18-23. I am providing the Oops information from kernel 2.2.18-21 since this is what was running on the system at the time the pppd dial in server crashed. The server crashes after several dial clients who are routing both IPX and IP attach and disconnect several times, then you attempt to telnet or ssh into the box over the ethernet link. The oops is actually occurring when a telnet session is attempted after someone disconnects from a pppd session. This Oops was created against the System.map file for a 2.2.18-21 build. This bug takes about two days to reproduce, and also requires that the local gateway system be misconfigured to point a non-existent network route to the target machine. It's very difficult to reproduce, but is very annoying. Jeff ksymoops 0.7c on i686 2.2.18pre21. Options used -V (default) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.2.18pre21/ (default) -m /usr/src/linux/System.map (default) Warning: You did not tell me where to find symbol information. I will assume that the log matches the kernel and modules that are running right now and I'll use the default options above for symbol resolution. If the current kernel and/or modules do not match the log, you can get more accurate output by telling me the kernel version and where to find map, modules, ksyms etc. ksymoops -h explains the options. No modules in ksyms, skipping objects Warning (read_lsmod): no symbols in lsmod, is /proc/modules a valid lsmod file? unable to handle kernel paing request virtual address 90c16C24 Oops: 0002 CPU: 0 EIP: 0010:[] Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010206 eax: 90c16c20 ebx: c16c6145 ecx: edx: c0226e2c esi: c0259200 edi: c16c614d ebp: c0259200 esp: c17f9ee8 ds: 18 es: 18 ss: 18 Call Trace: [] [] [] [] [] [] [] [] Warning (Oops_read): Code line not seen, dumping what data is available >>EIP; c0137596<= Trace; c01377fe Trace; c0137816 Trace; c0144bbc Trace; c0131238 Trace; c0131434 Trace; c013151c Trace; c012f532 Trace; c010a2fc 3 warnings issued. Results may not be reliable.
Re: PCI problem with an Olivetti M4
I've updated the http://www.gest.unipd.it/~iig0573/lspci.txt to include the output of pciconf -l from FreeBSD - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
PCI problem with an Olivetti M4
Hello I have an old PC, it's an Olivetti M4 (P166) and I tried to install linux on it. But I got a problem: just after LILO has loaded the kernel (after 'Loading..') the screen becomes black and I can't see anything. In other words the video card doesn't seem to work. I also tested tha same system with FreeBSD 4.1.1.1 and it works without problems. I can boot the linux kernel and I can access the system with ssh. I found something interesting. The video card is a PCI Trident 9660 integrated on the mainboard but lspci doesn't show it: fourier:~# lspci 00:00.0 Host bridge: Intel Corporation 430FX - 82437FX TSC [Triton I] (rev 02) 00:07.0 ISA bridge: Intel Corporation 82371FB PIIX ISA [Triton I] (rev 02) 00:07.1 IDE interface: Intel Corporation 82371FB PIIX IDE [Triton I] (rev 02) it doesn't find the PCI card. FreeBSD detects it with the pci id 00:09.0 I tried to boot either a 2.2.18pre17 kernel or a 2.4.0-test11 kernel. No kernel worked. I tried also to change the PCI access: pci access Direct, Any or BIOS... nothing changed... I tried also to compile the vesa framebuffer (as the card should be vesda compliant) but it didn't work. On #kernelnewbies somebody told me to enable the DEBUG definition in the pci subsystem and this is what I get in the dmesg (kernel 2.4.0-test11): PCI: BIOS32 Service Directory structure at 0xc00fdb50 PCI: BIOS32 Service Directory entry at 0xfdb60 PCI: BIOS probe returned s=00 hw=01 ver=02.10 l=00 PCI: PCI BIOS revision 2.10 entry at 0xfdb81, last bus=0 PCI: Probing PCI hardware PCI: IDE base address fixup for 00:07.1 PCI: Scanning for ghost devices on bus 0 PCI: IRQ init PCI: IRQ fixup PCI: Allocating resources PCI: Resource ffa0-ffaf (f=101, d=0, p=0) PCI: Sorting device list... Limiting direct PCI/PCI transfers. On http://www.gest.unipd.it/~iig0573/lspci.txt you'll find the output of lspci -xvv Thanks, Gianluca - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Multi NICs. Single HOP (NIC) Problem.
Hello, I have been struggling for a few months to get some internet servers to use 3-4 NICs effectively. I want to bind deamons to their own NIC so they are used independently. This is all IP software and i can get software to bind to these IPs (usually as standalone daemons) The host computers have 3-4 NICs running in 100MbpsTX-FD using a switch I slight problem with DNS resolver on some computers is that it can default to any NIC using the same address range/netmask though this has nothing to do with the "hop node" to ethernet adapter. This is one example. (ISP style) Apache in master daemon mode (bind/listen on) - bound to eth1 IP FTPD in standalone mode (daemonaddress) - bound to eth2 IP What I want to do is get each daemon using a seperate NIC (fastest network performance with help from running without inetd and some tuning) At first i believed that, because the DNS resolver can use any NIC (using the same address range as ip specified in resolv.conf file) the other NICs are not being used. But a DNS Server using the listen-on directive for the pair of NICs proved this not so. I've tried ipchains & tcpdump to figure out what's happening so I am doing things like the following ipchains -A input -i eth1 -s $ETH2_IP etc Using tcpdump the second nic isn't used. Yet the daemon on this is bound to eth2 ip address by a directive. So i believe it's a matter of arriving packets, and has something to do with the route taken when the packet was sent (on the last hop). if the previous "hop node" has been told that eth1 is the route to eth2's address, then this can happen. Question is, is their anyway to force the kernel or TCP/IP stack governing the IPs not to accept one IP (NIC1) destined for the other (NIC2). It must go through it's corresponding path. If not, then i believe that a single gigabit ethernet adapter with ip aliases is a better solution and faster (isn't necassarily the case) than 3 or 4 100baseTX cards in full duplex Any Help/Advice appreciatted Best Regards Kevin D. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.2.17 wont compile on AMD k6@-550
Hello kernel hackers, I am having problems with compiling a kernel on an AMD K62-550. I am running Red Hat 6.2, and am getting error messages like this: cc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o tcp_output.o tcp_output.c cc: Internal compiler error: program cc1 got fatal signal 11 make[3]: *** [tcp_output.o] Error 1 make[3]: Leaving directory `/usr/src/linux/net/ipv4' make[2]: *** [first_rule] Error 2 make[2]: Leaving directory `/usr/src/linux/net/ipv4' make[1]: *** [_subdir_ipv4] Error 2 make[1]: Leaving directory `/usr/src/linux/net' make: *** [_dir_net] Error 2 my cpuinfo is as follows: processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping : 12 cpu MHz : 551.243978 fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mmx 3dnow bogomips : 1101.00 This is the first time I have posted anyting kernel compile related so let me know what you need. Thanks in Advanced, -- Kind Regards Timothy A. DeWees - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Promise 20262 on 2.2.17 - can't find second IDE channel?
I have a Promise 20262 card. I'm using ide.2.2.17.all.2904.patch.bz2 on an otherwise unpatched 2.2.17 kernel. I'm able to detect one (the one marked "IDE 1"), but only one, of the two IDE interfaces on the card. That interface seems to work, but the other isn't detected at all. The RAID BIOS claims to be version "1.30 build 2". In order to placate that annoying piece of software, it's configured to use four drives in striping mode, but I assume (hope, even) that those details are cheerfully ignored by Linux. Complete dmesg output: Linux version 2.2.17 (root@krypton) (gcc version 2.95.2 2220 (Debian GNU/Linux)) #3 SMP Mon Oct 23 17:53:22 EDT 2000 Scan SMP from c000 for 1024 bytes. Scan SMP from c009fc00 for 1024 bytes. Scan SMP from c00f for 65536 bytes. Intel MultiProcessor Specification v1.1 Virtual Wire compatibility mode. OEM ID: OEM0 Product ID: PROD APIC at: 0xFEE0 Processor #1 Pentium(tm) Pro APIC version 17 Floating point unit present. Machine Exception supported. 64 bit compare & exchange supported. Internal APIC present. Bootup CPU Processor #0 Pentium(tm) Pro APIC version 17 Floating point unit present. Machine Exception supported. 64 bit compare & exchange supported. Internal APIC present. Bus #0 is PCI Bus #1 is PCI Bus #2 is ISA I/O APIC #2 Version 17 at 0xFEC0. Processors: 2 mapped APIC to e000 (fee0) mapped IOAPIC to d000 (fec0) Detected 551264 kHz processor. Console: colour VGA+ 80x25 Calibrating delay loop... 1101.00 BogoMIPS Memory: 257888k/262080k available (864k kernel code, 428k reserved, 2836k data, 64k init) Dentry hash table entries: 32768 (order 6, 256k) Buffer cache hash table entries: 262144 (order 8, 1024k) Page cache hash table entries: 65536 (order 6, 256k) VFS: Diskquotas version dquot_6.4.0 initialized Checking 386/387 coupling... OK, FPU using exception 16 error reporting. Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX mtrr: v1.35a (19990819) Richard Gooch ([EMAIL PROTECTED]) Intel machine check architecture supported. Intel machine check reporting enabled on CPU#1. per-CPU timeslice cutoff: 99.98 usecs. CPU1: Intel Pentium III (Katmai) stepping 03 Getting VERSION: 40011 Getting VERSION: 40011 Getting LVT0: 8700 Getting LVT1: 400 setup_APIC_clock() called. calibrating APIC timer ... . 5512441 CPU clocks in 1 timer chip tick. . 1002260 APIC bus clocks in 1 timer chip tick. . CPU clock speed is 551.2441 MHz. . system bus clock speed is 100.2260 MHz. CPU map: 3 Booting processor 0 eip 2000 Setting warm reset code and vector. 1. 2. 3. Asserting INIT. Deasserting INIT. Sending STARTUP #1. After apic_write. Before start apic_write. Startup point 1. Waiting for send to finish... +CPU#0 waiting for CALLOUT Sending STARTUP #2. After apic_write. Before start apic_write. Startup point 1. Waiting for send to finish... +After Startup. Before Callout 0. After Callout 0. CALLIN, before enable_local_APIC(). setup_APIC_clock() called. waiting for other CPU calibrating APIC ... done, continuing. Calibrating delay loop... 1101.00 BogoMIPS Stack at about cffebfa4 Intel machine check reporting enabled on CPU#0. OK. CPU0: Intel Pentium III (Katmai) stepping 03 CPU has booted. Before bogomips. Total of 2 processors activated (2202.01 BogoMIPS). Before bogocount - setting activated=1. Boot done. enabling symmetric IO mode... ...done. ENABLING IO-APIC IRQs init IO_APIC IRQs IO-APIC (apicid-pin) 2-0, 2-10, 2-11, 2-13, 2-17, 2-18, 2-20, 2-21, 2-22, 2-23 not connected. number of MP IRQ sources: 15. number of IO-APIC #2 registers: 24. testing the IO APIC... IO APIC #2.. register #00: 0200 ...: physical APIC id: 02 register #01: 00170011 ... : max redirection entries: 0017 ... : IO APIC version: 0011 register #02: ... : arbitration: 00 IRQ redirection table: NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect: 00 000 00 100 0 00000 01 000 00 000 0 01159 02 0FF 0F 000 0 01151 03 000 00 000 0 01161 04 000 00 000 0 01169 05 000 00 000 0 01171 06 000 00 000 0 01179 07 000 00 000 0 01181 08 000 00 000 0 01189 09 000 00 000 0 01191 0a 000 00 100 0 00000 0b 000 00 100 0 00000 0c 000 00 000 0 01199 0d 000 00 100 0 00000 0e 000 00 000 0 011A1 0f 000 00 000 0 011A9 10 0FF 0F 110 1 011B1 11 000 00 100 0 00000 12 000 00 100 0 00000
Insight on CD-RW/ATAPI Bugs in 2.2.18/2.4.0
I,ve been burning CD's all week, and I've run across some things that may shed some light on the CD burner bugs. I have seen this bug on two different systems, one APIC based, the other non-APIC based. In the case of the APIC based systems, the CD-RW I/O errors only occur during high loading of Network I/O while a CD in in the tray burning. Conincidently, the number of I/O timout errors reported by the CD-RW device are exactly the same number of RX errors reported for the 100Mbit Ethernet Adapter (eepro100). This would tend to indicate that the Network Card, for whatever reason, serviced the interrupt for the CD-RW. I've seen errors like this back in the good old days of programming APIC/8259 code for NetWare where devices sharing 8259 interrupt lines while other devices using the IOAPIC were setup incorrectly, or where a driver would mess up the mask bits in port 0x21 of the 8259, and/or EOI sequences between drivers would get out of sync due to bugs. On the non-APIC system, I get a single I/O error, then the system hard hangs completely (as though the disk device is waiting for an interrupt and it never occurs. On the 8259, missing an EOI can block all other interrupts until it gets another EOI (since 8259 EOI's are non-specific unlike the APIC). On the APIC, since it's message based over an ICC bus, the local APIC will allow other interrupts to get through except the last one pending. This really looks like: A. Someone has a hole somewhere in the code where an EOI is getting missed or they are EOIing twice which is causing stuff to get out of sync. B. The IOAPIC is not configured properly. C. Chained devices that share A,B,C, or D PCI interrupts are taking interrupts for other devices. THe hard hang on the AMD system really looks like a missed interrupt. I am seeing RX errors for te Ethernet Card on the AMD system before it hard hangs. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: has anyone fixed 2.4.0-test9+ ide-scsi cd recording?
On Wed, Oct 11, 2000 at 09:59:10PM -0700, Thomas Zimmerman wrote: > safemode wrote: > > > > The only reason I'm asking this is because nobody has mentioned it and it > > seems to have gotten put on the back-burner .. i have heard a lot about > > 2.2.x ide-scsi fixes but nothing about 2.4.0 ... what's the status of this? > > > It works here with a Acer CD-RW drive...but then I never noticed a > problem in 2.4.0test9 I only see the problem on 2.4.0 if speed=4 (rarely seen) or speed=8 (always) on both a MATSHITA IDE CD-RW and a Panasonic CD-RW. Works fine on speed 2, most of the time on speed 4, and 1 out of 3 CD burns at speed=8. Andre has a new patch that fixes this stuff, but it is not in at this point. You should ask [EMAIL PROTECTED] Jeff > > Thomas > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Availability of kdb
Linus Torvalds wrote: > On Sun, 17 Sep 2000, Marty Fouts wrote: > > > > Craftsmanship is in the way you approach what you do, not in the tools you > > use to do it. And, frankly, if you wish to artificially limit your use of > > tools, all you are doing is hobbling yourself. > > You know what? > > Start your own kernel (or split one off from Linux - that's what the GPL > is all about), and we'll see where you are in ten years. If kernel > debuggers are so much better, then you'll be quite well off, and you can > prove your silly opinions by _showing_ them right. Good answer. > > > In the meantime, I've shown what my opinions are worth. Take a look, any > day. Available at your nearest ftp-site. > > Talk is cheap. If you want to convince me, do the WORK. And I am finding out just how much work indeed. But I have to say, it's a hell of a lot cleaner than the NetWare Source Base and alot better organized :-) > > > Linus > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
[BUG] 2.2.17 final crashes
Twice now I have experienced this crash, but I do not know how to replicate it. The system was under normal load (netscape, xmms, and few other minor programs) First, xmms stopped playing. Then, the screen went black and the system speaker began beeping feverously. I reached to hit the reboot button on my case, when it rebooted itself. I have no watchdog support compiled in. My system is a: 500MHz AMD-K6/2 64MB RAM M599LMR PCChips Motherboard The kernel I'm running is 2.2.17 w/ ext3 patch. Config availible upon request. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
2.4.0-test5 problems with Promise ATA100
After compliation with the Promise UDMA chipsets support, with Use DMA by Default checked, the kernel refuses to acknowledge the existence of the chip. I have an ASUS K7M m/b that has the controller built in to the motherboard. After using dmesg I saw no attempts at all to use the kernel driver at all, no error message, etc. Any ideas? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Problem booting 2.4.0-test series
> > > My PC hangs after "OK, booting the kernel". I have a pentium, but this problem >occurs whether I configure the kernel as pentium, 486 or 386. > > it's worth asking: what compiler are you using? gcc 2.95.2 I don't really know what other info is needed to track down the bug. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Problem booting 2.4.0-test series
With all of 2.4.0-test series, and at least 2.3.51, I've been unable to boot. I'm in the process of getting other 2.3 kernels, to see where the problem was introduced. My PC hangs after "OK, booting the kernel". I have a pentium, but this problem occurs whether I configure the kernel as pentium, 486 or 386. I've never had a problem with the 2.2 series, and currently use 2.2.16. Can anyone suggest a way for me to track down this problem. I cant really debug tanything, since I hang before the boot process is anywhere near complete. Any suggestions gratefully received. -- Craig Wilkie [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/