Hi guys, Please excuse the long delay. I've been on vacation/offline.
On 6/8/06, Vivek Goyal <[EMAIL PROTECTED]> wrote: > On Wed, Jun 07, 2006 at 11:00:05PM +0900, Magnus Damm wrote: > > Maybe I'm misunderstanding, but a "statically allocated page table" > > sounds like a set of pages that are compiled in the kernel. With my > > patch the page tables are allocated during "prepare", ie when the new > > kernel is loaded with the kexec tool. Until that time no extra pages > > are used by the kernel. This is quite different from a "statically > > allocated page table" which is using the pages regardless of if a new > > kernel is loaded or not. > > > > >>Also, how can you > > >> be sure that the static pages are in a DMA-safe address range? > > >> > > > > > >Why would kernel setup DMA on statically allocated pages? > > > > You tell me. =) My patch is using kimage_alloc_control_pages() and my > > code assumes that it gets DMA-safe pages from that function. If you > > think my code is unsafe please let me know. > > > > Maybe it's no problem but I cannot see any advantage of static page > > tables. I just think it is overly complex with no special reason. I'm > > thinking about CONFIG_PHYSICAL_START and how to always make sure the > > pages are in a good non-conflicting range. > > kimage_alloc_control_pages() already handles the range issue for us, > > and I'm not sure how to guarantee that for statically allocated pages. > > > > I think Eric is talking of only to allocate page_table_a statically. On x86_64 the size of page_table_b varies with the amount of physical memory so it is probably a good idea to allocate these pages on demand. > I think CONFIG_PHYSICAL_START should not be a problem. You anyway will > switch to page_table_b before you start copying the pages and overwrite > the previous kernel's text section. Kernel also should not set up > DMA to these statically allocated pages so there is no problem in > allocating page_table_a statically AFAIKS. You are right, there should be no problem with DMA. > I don't know what are the advantages of static allocation. Eric > can throw some light. I'd like to hear the advantages. Right now I can only see the disadvantages of static allocation. If page_table_a is statically allocated 7/5/3 pages will be consumed on x86_64/i386+PAE/i386. I'd like to stay away from eating 12-28 Kbytes of kernel memory statically (= at boot time) without any special reason. Let me know what you think and I will rewrite and break out the code. Thanks, / magnus _______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
