On Friday 19 November 2010 22:13:50 Mick wrote:

> Short of measuring the latency with some system (which I wouldn't
> know how) I have experimented with setting the /boot partition on
> primary and logical partitions and the difference (on a stopwatch)
> was measurable in seconds betweeen having said partition on a
> primary and having it on a logical. Furthermore, sda7 was slower
> than sda5.
> 
> I haven't measured latencies for first mount and subsequent look ups.
> I thought that it would be the same every time a partition fs is
> being accessed, no?

I shouldn't design it that way. Would you?

Consider the layout of the disk. First we have the master boot record, 
which contains the disk addresses of the four allowable primary 
partitions*, and not much else besides the primitive boot code to fetch 
the data from those addresses. Then each primary partition has the 
address of its first directory containing data. Those five parameters are 
assumed to be fixed and can be held in a small lookup table in the OS.

One primary partition may be declared as an "extended" partition, by the 
setting of a single bit in its entry in the MBR**. That partition has to 
have the same header layout as the others, in particular not allowing 
more than one data address***. In this case it's the address not of the 
first directory but of the first logical partition - and that partition 
has to have the same header layout again, because it's just a partition 
full of data, isn't it?

The answer to your question is that only very few values are needed to 
specify the fixed start points of all the partitions on the disk, and 
virtually no overhead is involved in storing them for the inevitably 
frequent use they're going to get.

(Sorry if I'm rambling. I've been down with the dreaded lurgy for a day 
or two, and after a small glass of wine this evening I'm having trouble 
focusing on the screen, never mind my thoughts.)

* One partition is plenty for all normal folk, especially those who run 
an OS that's convinced it's the only entity in the universe - who could 
possibly want more than four? And just don't mention 640KB memory unless 
you're prepared for fisticuffs.

** Talk about a single point of failure!

*** Well, of course it doesn't, but what would we do without hindsight?

-- 
Rgds
Peter.          Linux Counter 5290, 1994-04-23.

Reply via email to