public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How does the disk buffer cache work?
@ 2002-12-31  0:33 Matthew Zahorik
  2002-12-31  1:24 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Zahorik @ 2002-12-31  0:33 UTC (permalink / raw)
  To: linux-kernel

Earlier I wrote to the list where my SS10 hung on the partition check
if a bad disk was installed.

This behavior is new to the 2.4.20 kernel.  I previously ran 2.2.20 on the
machine. (the default in a Debian 3.0r0 install)  I can't vouch for 2.4
kernels previous to 2.4.20.

I have traced the problem to a hang in the one of the disk buffer caches.

Can anyone tell me how to correct the behavior so that I:

1.  Don't break things for other parts of the kernel
2.  The disk cache will return with an error for a hung disk?

Here's the tail of the console with debugging printk's inserted:

sda: Spinning up disk.......................................................................................................not responding...
sda : READ CAPACITY failed.
sda : status = 0, message = 00, host = 0, driver = 28
Current sd00:00: sense key Not Ready
Additional sense indicates Logical unit is in process of becoming ready
sda : block size assumed to be 512 bytes, disk size 1GB.
Partition check:
 sda:sun.c/sun_partition: Before read_dev_sector
check.c/read_dev_sector: offset = 0
check.c/read_dev_sector: passing page filler function @ f004fd14
filemap.c/read_cache_page: enter
filemap.c/read_cache_page: before __read_cache_page
filemap.c/__read_cache_page: enter
block_dev.c/block_read_full_page: before first do
block_dev.c/block_read_full_page: before if (!nr)
block_dev.c/block_read_full_page: before stage two
block_dev.c/block_read_full_page: before starting I/O
block_dev.c/block_read_full_page: returning
filemap.c/read_cache_page: after __read_cache_page
filemap.c/read_cache_page: after mark_page_accessed

[.. the next function call in read_cache_page() is lock_page(), which we
hang forever on ..]

Can those more familiar with the buffer caches advise me on a solution?
Errors on cached devices should propagate up to higher layers.  As is, the
machine hangs forever when reading sector 0 to check the partition table.

Thanks!

- Matt


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How does the disk buffer cache work?
@ 2003-01-05  1:29 John Bäckstrand
  0 siblings, 0 replies; 9+ messages in thread
From: John Bäckstrand @ 2003-01-05  1:29 UTC (permalink / raw)
  To: linux-kernel

Matthew Zahorik wrote:
>
> Earlier I wrote to the list where my SS10 hung on the
partition check
> if a bad disk was installed.
>
> This behavior is new to the 2.4.20 kernel.  I
previously ran 2.2.20 on the
> machine. (the default in a Debian 3.0r0 install)  I
can't vouch for 2.4
> kernels previous to 2.4.20.
>
> I have traced the problem to a hang in the one of the
disk buffer caches.
>
> Can anyone tell me how to correct the behavior so
that I:
>
> 1.  Don't break things for other parts of the kernel
> 2.  The disk cache will return with an error for a
hung disk?
>
> Here's the tail of the console with debugging
printk's inserted:
>
> ...
> [.. the next function call in read_cache_page() is
lock_page(), which we
> hang forever on ..]

This happens to me aswell. 2.5.35(I think) and 2.4.20
is not working, a slackware 2.2 bootdisk is fine though
so something is wrong. The hdd is fine in DOS aswell.

---
John Bäckstrand



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How does the disk buffer cache work?
@ 2003-01-05 19:08 John Bäckstrand
  0 siblings, 0 replies; 9+ messages in thread
From: John Bäckstrand @ 2003-01-05 19:08 UTC (permalink / raw)
  To: linux-kernel

> > Earlier I wrote to the list where my SS10 hung on
the partition check
> This happens to me aswell. 2.5.35(I think) and 2.4.20
> is not working, a slackware 2.2 bootdisk is fine
though
> so something is wrong. The hdd is fine in DOS aswell.

More details: lspci -vv output for the IDE controller:

00:07.1 IDE interface: Intel Corp. 82371FB PIIX IDE
[Triton I] (rev 02) (prog-if 80 [Master])
        Control: I/O+ Mem- BusMaster+ SpecCycle-
MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32
        Region 0: [virtual] I/O ports at 01f0
        Region 1: [virtual] I/O ports at 03f4
        Region 2: [virtual] I/O ports at 0170
        Region 3: [virtual] I/O ports at 0374
        Region 4: I/O ports at 3000 [size=16]

The hdd is a 1GB ST51080A, but I dont know if its the
particualr hdd that causes problems, or if its
something else. A cdrom on the same channel works. Dont
have any other hdds to test with right now.

---
John Bäckstrand



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How does the disk buffer cache work?
@ 2003-01-06 10:30 John Bäckstrand
  0 siblings, 0 replies; 9+ messages in thread
From: John Bäckstrand @ 2003-01-06 10:30 UTC (permalink / raw)
  To: linux-kernel

> More details: lspci -vv output for the IDE
controller:
>
> 00:07.1 IDE interface: Intel Corp. 82371FB PIIX IDE
> [Triton I] (rev 02) (prog-if 80 [Master])
>         Control: I/O+ Mem- BusMaster+ SpecCycle-
> MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
>         Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
> DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR-
<PERR-
>         Latency: 32
>         Region 0: [virtual] I/O ports at 01f0
>         Region 1: [virtual] I/O ports at 03f4
>         Region 2: [virtual] I/O ports at 0170
>         Region 3: [virtual] I/O ports at 0374
>         Region 4: I/O ports at 3000 [size=16]
>
> The hdd is a 1GB ST51080A, but I dont know if its the
> particualr hdd that causes problems, or if its
> something else. A cdrom on the same channel works.
Dont
> have any other hdds to test with right now.

I saw that this mail did not connect to the right
thread, so to recap: With this hdd as master on my
second IDE channel, 2.4.20 hangs at the partition
check, a backtrace:

lock_page
read_cache_page
read_dev_sector
handle_ide_mess
msdos_partition
check_partition
grok_partitions
register_disk
ide_geninit
ide_init
blk_dev_init
device_init
do_initcalls

There is a primary msdos partition on this drive that
use the entire disk, but I also tried with a clear
partition table. 2.2 slackware bootdisk is fine, DOS is
fine in using the hdd. If anybody wants more info, just
tell me what to do. Im not on the list so reply to me
if so. I also tried lots of IDE patches but didnt help.
Any specific kernel versions or kernel options I should
try/disable/enable?

---
John Bäckstrand



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-01-07 16:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-31  0:33 How does the disk buffer cache work? Matthew Zahorik
2002-12-31  1:24 ` Andrew Morton
2002-12-31  2:58   ` Matthew Zahorik
2002-12-31  4:14     ` Andrew Morton
2003-01-01 19:19   ` sd driver NOT_READY behavior / was " Matthew Zahorik
2003-01-01 21:32     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2003-01-05  1:29 John Bäckstrand
2003-01-05 19:08 John Bäckstrand
2003-01-06 10:30 John Bäckstrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox