Re: natsemi.c failure in 2.4.6

2001-07-06 Thread Studierende der Universitaet des Saarlandes

> Found that in 2.4.6, Natsetmi card I have doesn't receive
> traffic anymore.  It worked in 2.4.5, though.
> 
> The natsemi card is forced to 10/half via mii-diag at boot,
> and given a different MAC address (due to some problems I had with
> the original MAC address and netbooting a sparc).  Forcing it to
> 100/full didn't work, either.

Could you try what happens without any special options? Default MAC
address, without mii-diag.

>  Basic mode control register 0x2100: Auto-negotiation disabled, with
>  Speed fixed at 100 mbps, full-duplex.

> [PC Linux 2.4.6] <--> p10/100 hub] <--> [SS4 NetBSD 1.5]

> Speed fixed at 100 mbps, full-duplex.

>  I'm advertising 05e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT
>Advertising no additional info pages.
>IEEE 802.3 CSMA/CD protocol.
>  Link partner capability is 45e1: Flow-control 100baseTx-FD 100baseTx
>10baseT-FD. 10baseT.  Negotiation  completed.

Something is wrong.
Are you sure it's a hub? The link partner ability says FullDuplex
capable, it's either a switch or the negotiation produced wrong results.

The natsemi nic advertises 5e1, but the speed is fixed at 100 mbps.
Probably a forced renegotiation after mii-diag changes is missing, and
the forced settings aren't used properly.

I'll look at it.

--
Manfred
-
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: [PATCH] sym53c8xx timer and smp fixes

2001-06-01 Thread Studierende der Universitaet des Saarlandes

Jeff wrote:
>
> so, this driver is mixed spinlocks and save/restore_flags? Any
> chance this can be converted to all spinlocks? 
>
It's spinlock for 2.2 and 2.4 kernels, and save_flags for 2.0.

Tim, did you cc Gerard Roudier? He mainains the sym53c8xx driver. All
mail archives strip the cc list :-(

--
Manfred
-
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: [PATCH] net

2001-05-30 Thread Studierende der Universitaet des Saarlandes

> > @@ -643,9 +631,7 @@ 
> >  eexp_hw_tx_pio(dev,data,length); 
> > } 
> > dev_kfree_skb(buf); 
> > -#ifdef CONFIG_SMP 
> > spin_unlock_irqrestore(&lp->lock, flags); 
> > -#endif 
> > enable_irq(dev->irq); 
> > return 0; 
> 
> They are done this way to get good non SMP performance. Your changes would 
> ruin that. 

I think the spin_lock could be removed on SMP, too.

Concurrent xmit & timeout calls are prevented by core network code, and
concurrent interrupts are prevented by disable_irq().

Or replace spin_lock_irqsave() with spin_lock().

--
Manfred
-
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: softirq question

2001-05-23 Thread Studierende der Universitaet des Saarlandes

> Is it possible to enter into sleep mode 
> ( current->state = !RUNNING && schedule(_timeout)) 
> from a softirq ? 

calling schedule() causes a panic() in schedule(), and even an innocent

current->state = TASK_RUNNING;

from an softirq causes runqueue corruptions.[you must use
wake_up_process() since it's not guaranteed that 'current' is actually
in the runqueue.]

--
Manfred
-
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: noapic doesn't quite work as advertised

2001-05-23 Thread Studierende der Universitaet des Saarlandes

> 've got a tyan s2520 motherboard (dual PIII + i840) which is having a 
> problem with APIC errors. I tried running with noapic, but there were 
> still errors, although fewer. Does anyone have any idea what is going 
> on? I'm running 2.4.4 and software raid5, which generates a lot of 
> interrupts. 

noapic only prevents that hardware interrupts are rerouted through the
io apic.

The inter processor interrupts still use the apic bus, and it's
impossible to use SMP without IPIs.

> Right now I'm running with noapic and nosmp and so far this seems to 
> be working. I really would like to be able to use the second 
> cpu so any suggestion would be greatly appreciated. 

It could be a hardware problem, or the board uses an unusal io apic
that's not properly handled.
If you boot without noapic, are there any unusual message in the boot
log?

Perhaps
MP-BIOS bug
unknown io apic
etc.
-
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: tulip driver BROKEN in 2.4.5-pre4

2001-05-21 Thread Studierende der Universitaet des Saarlandes

Could you post the output of

#tulip-diag -mm -aa -f

with the broken driver?
Some code that's required for Linksys Tulip clones was moved from pnic
specific part into the generic part, perhaps that causes problems.

--
Manfred
-
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/



icache > dentry cache. memory leak? Re: Fwd: Re: memory usage - dentry_cache

2001-04-11 Thread Studierende der Universitaet des Saarlandes

> To possbile answer my own question: 
> if I do a can on /proc/slabinfo I get on the machine with "MISSING" memory: 
>  
> slabinfo - version: 1.1 (SMP) 
> --- cut out 
> inode_cache 920558 930264 480 116267 116283 1 : 124 6 
> --- cut out 
> dentry_cache 557245 638430 128 21281 21281 1 : 252 126 
> 
You've found the missing memory: the fifth number is the number of pages
allocated for a cache: 125000 pages or 500 MB.

The first number is the number of allocated objects, the second number
is the total number of objects (the difference are preallocated
dentries/inodes to speed up further allocations and internal
fragmentation)
the third number is the size in bytes of one structure, then the number
of pages in use, and the total number of pages (the difference are
freeable pages that can be free by the memory pressure code)

The odd thing is that the inode cache is nearly twice as large as the
dentry cache.
Does that indicate a memory leak?

--
Manfred
-
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: [PATCH] Re: softirq buggy

2001-04-09 Thread Studierende der Universitaet des Saarlandes

> > I'd prefer to inline cpu_is_idle(), but optimizing the idle 
> >code path is probably not that important ;-) 
>
> Sure it is, in one way: how fast can you get back to work? 
> (not OK to take a millisecond getting out of the idle loop) 

2 short function calls instead of 2 "if(current->need_resched)" on the
way out.

I didn't try very hard to fix the inline dependencies, could you try to
move cpu_is_idle() from kernel/sched.c into ?

I'm sure it won't be more difficult than the last "Athlon+SMP doesn't
compile" problem ;-)

--
Manfred
-
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: random PIDs

2001-04-05 Thread Studierende der Universitaet des Saarlandes

> 
> M> IIRC get_pid will loop forever if it doesn't find a free pid, and in the 
> M> worst case you can trigger that with ~11000 running threads. 
> 
> Ah, ok. But why would you have 11.000 running threads? 

Denial of Service attack. 11000 processes and the kernel locks up hard,
regardless of the amount of memory.(sane ulimits prevent that)

> M> And the current code can create multiple threads with the same pid (I 
> M> never tried to trigger that bug, but it seems to be possible) 
>
> mine will do that too: 
> 
> if (flags & CLONE_PID) 
> return current->pid; 
> 
CLONE_PID is a special flag for the boot process, normal processes can't
set that flag. (first line of do_fork() returns -EPERM)

Even without CLONE_PID two threads can get the same pid:
get_pid searches for a new pid by scanning though the task list.
But the caller of get_pid doesn't atomically add the new value to the
task list.
If copy_fs, copy_files, copy_mm sleep, then a second thread could get
the same pid.
It's only possible if nearly all pid values are used up, so it's not a
problem that must be fixed immediately.

--
Manfred
-
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: random PIDs

2001-04-05 Thread Studierende der Universitaet des Saarlandes

>  Finished & tested my random PID kernel/fork.c:get_pid() replacement. 
> > This one keeps track of the last N (default is 64) pids who have exited. 
> > These are then not used. So, one cannot have more then 32767 - (64 + 1 
> > (init) + 1 (idle)) = 32761 processes :o) 
> DW> Huh, should be 32701, right?! 
> 
> You're absolutely right. It must've been the victory trance :o) 
>
Have you actually tried to create lots of threads?

IIRC get_pid will loop forever if it doesn't find a free pid, and in the
worst case you can trigger that with ~11000 running threads.

And the current code can create multiple threads with the same pid (I
never tried to trigger that bug, but it seems to be possible)

--
Manfred
-
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: URGENT : System hands on "Freeing unused kernel memory: "

2001-03-27 Thread Studierende der Universitaet des Saarlandes

I have 2 ideas:
* glibc corrupted
* did you downgrade the cpu?

RH 7.0 automatically installs glibc for a Pentium Pro or later if that
cpu is present during install.
If you then move the hd into a computer with an AMD K6, it won't boot.

I'd run

#rpm -Va

and check if some unusual files are modified (...5.. without "c")

--
Manfred
-
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: [patch] pae-2.4.3-A4

2001-03-26 Thread Studierende der Universitaet des Saarlandes

> plus i took to opportunity to reduce the allocation size of PAE-pgds. 
> Their size is only 32 bytes, and we allocated a full page. Now the code 
> kmalloc()s a 32 byte cacheline for the pgd. (there is a hardware 
> constraint on alignment: this cacheline must be at least 16-byte aligned, 
> which is true for the current kmalloc() code.)

No, it isn't ;-)

Just enable slab debugging (it's a kernel option in alan's ac kernels),
and then the kmalloc result is not aligned anymore.

--
Manfred
-
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 2.2.16 through 2.2.18preX TCP hang bug triggered by rsync

2001-01-25 Thread Studierende der Universitaet des Saarlandes

Andi wrote:
> Basically it would accept the acks with the data in most
> cases except when the application has totally stopped
> reading and in that case it doesn't harm to ignore the
> acks. 

But it seems that that's exactly what rsync does:
It performs bulk data writes without reading. There are 32 kB in the
receive buffers, and rsync continues to write. If the process would read
some data the TCP stack would immediately recover.

RST are already processed, ACK's should be processed, but what about
URG? 

--
Manfred
-
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/