public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Dickson <ross@datscreative.com.au>
To: Jamie Lokier <jamie@shareable.org>, forming@charter.net
Cc: Ian Kumlien <pomac@vapor.com>, linux-kernel@vger.kernel.org
Subject: Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Date: Sun, 14 Dec 2003 21:24:45 +1000	[thread overview]
Message-ID: <200312142124.45966.ross@datscreative.com.au> (raw)
In-Reply-To: <20031214042714.GB21241@mail.shareable.org>

On Sunday 14 December 2003 14:27, Jamie Lokier wrote:
> Ross Dickson wrote:
> > The v1 patch ((cpu_khz >> 12)+200) gave 700ns additional delay to
> > your existing code path so I think I was being too optimistic in the
> > initial v2 timing. I made the initial timing CPU freq dependent on
> > the assumption that a faster cpu would get to the delay point
> > quicker.
> 
> Maybe it scales with bus speed, not CPU internal speed?

Very good point.

Hmmm It may well be the settling time of the cpu PLL (phase lock
loop) changing from low power disconnect speed up to bus speed -
higher speed bus on the same type of silicon may take longer? as
also it may take more power to run faster so the internal bus bit
drivers may also take more time to settle? These sorts of things are
mentioned in earlier model athlon errata. Especially if there is perhaps
a marginal northbridge timing in the area Ian has thought about?

The nforce2 ram controller is also unique and kind of predicts and caches
reads so maybe the apic timer irq code is ready to run a lot sooner than 
other chipsets so the normal delays wrt loading from memory are not there?
Are we compensating for that? We don't really know unfortunately.

> 
> -- Jamie
> 
> 
> 

Josh - Thanks very much for the patches.

The v2 io-apic mods seems OK so far.

I am not yet sure the v2 apic patch is going to be stable enough for everyone.
I suspect it is the apic reads.

Ian had problems at 600ns so now has been trying 800ns. I have yet to hear how
his machine is.

I have also gone from 600ns to 800ns and had my first hard lockup
after about 6 hrs on 800ns delay timeout. 

I am using a heavily patched 2.4.23 kern so it could be a coincidence
but I am suspicious that it may not be that safe to be reading the apic
registers at all during the delay timeout as the v2 apic patch does.

I am now going to try increasing the wait loop delay from 100ns to 400ns
in case the apic does not like being hammered repetitively during the delay
time. - It could be that the bus between the cpu core and the local apic is
marginal on either timing (PLL) or current and if we hammer it we may
be asking for incorrect reads?

I am about to recompile with the following values that differ from my
original v2 posting. 
( 800UL and the ndelay(400) )

#ifdef CONFIG_MK7 && CONFIG_BLK_DEV_AMD74XX
	/*
	 * on AMDXP & nforce2 chipset we need about 800ns?
	 * from timer irq start to apic irq ack to prevent
	 * hard lockups, use apic timer itself.
	 * C1 disconnect bit related.  Ross Dickson.
	 */
	{
		static unsigned int passno, safecnt;
		if(!passno) { /* calculate timing */
			safecnt = apic_read(APIC_TMICT) -
				( (800UL * apic_read(APIC_TMICT) ) /
				(1000000000UL/HZ) );
			printk("..APIC TIMER ack delay, reload:%u, safe:%u\n",
				apic_read(APIC_TMICT), safecnt);
			passno++;
		}
#if APIC_DEBUG
		if(passno<12) {
			unsigned int at1 = apic_read(APIC_TMCCT);
			if( passno > 1 )
				Dprintk("..APIC TIMER ack delay, predelay count:%u \n", at1 );
			passno++;
		}
# endif
		/* delay only if required */
		while( apic_read(APIC_TMCCT) > safecnt )
			ndelay(400);
	}
#endif


Regards
Ross.

  reply	other threads:[~2003-12-14 11:18 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-13 18:07 Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered Ross Dickson
2003-12-13 20:22 ` Josh McKinney
2003-12-13 21:38 ` Ian Kumlien
2003-12-14  4:50   ` Josh McKinney
2003-12-13 22:28 ` Ian Kumlien
2003-12-13 23:16   ` Ross Dickson
2003-12-13 23:21     ` Ian Kumlien
2003-12-13 23:49       ` Ross Dickson
2003-12-14  4:27         ` Jamie Lokier
2003-12-14 11:24           ` Ross Dickson [this message]
2003-12-14 13:11             ` Ross Dickson
2003-12-14 13:44               ` Ian Kumlien
2003-12-14 17:26             ` Jamie Lokier
2003-12-13 23:31     ` Ian Kumlien
2003-12-15 11:41 ` Bob
     [not found] <BF1FE1855350A0479097B3A0D2A80EE0023ED17F@hdsmsx402.hd.intel.com>
2004-02-07 11:46 ` Len Brown
2004-02-07 12:41   ` Maciej W. Rozycki
2004-02-07 15:13     ` Len Brown
2004-02-07 16:24       ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2003-12-15 13:54 Ross Dickson
2003-12-16  1:40 ` Josh McKinney
2003-12-15 10:57 ross.alexander
2003-12-15 12:49 ` Maciej W. Rozycki
     [not found] <106Zu-1sD-3@gated-at.bofh.it>
     [not found] ` <1198P-3v0-1@gated-at.bofh.it>
     [not found]   ` <11gah-33u-1@gated-at.bofh.it>
     [not found]     ` <11wIo-4T4-7@gated-at.bofh.it>
     [not found]       ` <11xuB-6k3-11@gated-at.bofh.it>
     [not found]         ` <11AC6-3Sf-3@gated-at.bofh.it>
2003-12-11 17:11           ` Lenar Lõhmus
2003-12-11  2:50 Ross Dickson
2003-12-07 19:58 Ian Kumlien
2003-12-07 20:59 ` Jesse Allen
2003-12-07 20:56   ` Ian Kumlien
2003-12-08  2:07 ` Ross Dickson
2003-12-08  2:23   ` Ian Kumlien
2003-12-07 13:12 Ross Dickson
2003-12-09 15:20 ` Maciej W. Rozycki
2003-12-10  5:43   ` Ross Dickson
2003-12-10 16:06     ` Maciej W. Rozycki
2003-12-11  6:55       ` Ross Dickson
2003-12-11 11:47         ` Ian Kumlien
2003-12-11  9:12           ` Ross Dickson
2003-12-11 17:52             ` Ian Kumlien
2003-12-11 18:21               ` Jesse Allen
2003-12-12  9:27                 ` Bob
2003-12-11 14:58           ` Jesse Allen
2003-12-11 15:20             ` Craig Bradney
2003-12-11 16:05               ` Jesse Allen
2003-12-11 15:15         ` Maciej W. Rozycki
2003-12-11 16:23           ` Josh McKinney
2003-12-11 17:04             ` Maciej W. Rozycki
2003-12-11 17:25               ` Jesse Allen
2003-12-10  3:39 ` Jesse Allen
2003-12-10  9:22   ` Ross Dickson
2003-12-10 10:00   ` Mikael Pettersson
2003-12-10  8:40     ` Ross Dickson
2003-12-11 14:32     ` Jesse Allen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200312142124.45966.ross@datscreative.com.au \
    --to=ross@datscreative.com.au \
    --cc=forming@charter.net \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pomac@vapor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox