update/bdflush problem

Alexandr Malusek malusek na sysel.ujf.cas.cz
Pondělí Srpen 4 12:33:03 CEST 1997


kas na informatics.muni.cz (Jan Kasprzak) writes:

> 	Do polozky "buffers" se zapocitavaji veci, ktere nelze dat
> do strankove cache -- to jest metadata filesystemu, cteni z primeho
> zarizeni a podobne. Cteni ze souboru je obvykle provadeno pres
> 4kb velke kusy a uklada se rovnou do strankove cache. Strankova cache
> je prave od toho, aby se rovnou nacteny kus dat dal vzit a namapovat
> na prislusne misto adresoveho prostoru bez kopirovani.

Nevite, kde se o takovych vecech pise (krome zdrojaku)? V souboru
buffer.c jadra jsem nyni nasel poznamku, ktera potvrzuje, ze klasicke
diskove buffery se v Linuxu prestaly pouzivat:

/* Removed a lot of unnecessary code and simplified things now that
   the buffer cache isn't our primary cache - Andrew Tridgell 12/96 */

Nicmene puvodni predstavu o klasicke diskove cache v Linuxu jsem
ziskal z z dokumentu The Linux Kernel
http://www.linuxhq.com/guides/TLK. Je z dubna 1997 a pise se tam:

Whenever a file system needs to read a buffer its underlying physical
device, it trys to get a block from the buffer cache. If it cannot get
a buffer from the buffer cache then it will get a clean one from the
appropriate sized free list and this new buffer will go into the
buffer cache. If the buffer that it needed is in the buffer cache then
it may or may not be up to date. If it is not up to date or if it is a
new block buffer, the file system must request that the device driver
read the appropriate block of data from the disk.

Pouziti dd me v tomto jen utvrdilo, protoze /dev/hda2 je blokove
zarizeni, a tak jsem si rikal, ze by cteni melo jit pres diskove
buffery. Ale mate pravdu, ze je to jinak ...

-- 
Alexandr Malusek (malusek na ujf.cas.cz)
UJF AV CR


Další informace o konferenci Linux