Re: Linux kernel, possible useless continue



Rainer Weikusat <rainer.weikusat@xxxxxxxxx> writes:

[...]

Exactly. The outer loop loops over all entries in the top-level page
directory. It calls 'one_md_table_init' for each one, thereby
populating all 'page middle directory' tables,

That should be 'entires', not tables. The relevant two lines are below
(from one_md_table_init)

/* allocate a pmd */
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);

/* store its address into the associated pgd slot */
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));

(comments added by me).

And these two lines of code a executed on each itertation of the
'outer' loop in the routine in question if PAE is in use.
.