Re: [RFC] - Mapping ACPI tables as CACHED

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jack Steiner
Date: Tuesday, August 17, 2010 - 7:42 am

On Fri, Jul 23, 2010 at 09:23:01AM +0200, Ingo Molnar wrote:

Agree. I am looking for the right set of abstractions for this.



No. Unfortunately the function __acpi_map_tables()  is not called on the
path that does the permanent mappings. The code is (somewhat simplified):

        drivers/acpi/osl.c:

        acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
        {
                if (acpi_gbl_permanent_mmap)
                        return ioremap((unsigned long)phys, size);
                else
                        return __acpi_map_table((unsigned long)phys, size);
        }

Early in boot before "acpi_gbl_permanent_mmap" is set, __acpi_map_table()
is called to map tables.  __acpi_map_table() calls early_iomap() and all
early mappings are subsequently unmapped.

For the permanent mappings, we need a way to make the acpi code call
ioremap_cache() instead of ioremap() for all tables that are actually
in WB memory.

Timings made during boot show only a small benefit __acpi_map_table()
mapping tables cacheable. (I didn't check, but perhaps the early mapping
are only checking table IDs - not the full table).

The performance benefit of WB is for the permanent mapping made after
acpi_gbl_permanent_mmap is set. For some reason, most of the time
consuming references occur after this point. In addition ALL offnode
references occur after this point.


--- jack
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Thu Jul 22, 8:22 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Len Brown, (Thu Jul 22, 8:52 am)
Re: [RFC] - Mapping ACPI tables as CACHED, ykzhao, (Thu Jul 22, 6:46 pm)
Re: [RFC] - Mapping ACPI tables as CACHED, Ingo Molnar, (Fri Jul 23, 12:23 am)
Re: [RFC] - Mapping ACPI tables as CACHED, ykzhao, (Fri Jul 23, 7:26 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Fri Jul 23, 9:38 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Henrique de Moraes H ..., (Fri Jul 23, 5:14 pm)
Re: [RFC] - Mapping ACPI tables as CACHED, Matthew Garrett, (Fri Jul 23, 5:45 pm)
Re: [RFC] - Mapping ACPI tables as CACHED, Henrique de Moraes H ..., (Sat Jul 24, 5:26 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Tue Aug 17, 7:39 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Tue Aug 17, 7:42 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Tue Aug 17, 7:45 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Tue Aug 17, 7:49 am)
Re: [RFC] - Mapping ACPI tables as CACHED, H. Peter Anvin, (Tue Aug 17, 8:51 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Jack Steiner, (Tue Aug 17, 8:59 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Linus Torvalds, (Tue Aug 17, 9:02 am)
Re: [RFC] - Mapping ACPI tables as CACHED, H. Peter Anvin, (Tue Aug 24, 2:39 pm)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, Jack Steiner, (Thu Aug 26, 10:17 am)
Re: [RFC] - Mapping ACPI tables as CACHED, Len Brown, (Thu Aug 26, 10:47 am)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, H. Peter Anvin, (Thu Aug 26, 11:08 am)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, Jack Steiner, (Wed Dec 8, 2:22 pm)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, H. Peter Anvin, (Wed Dec 8, 6:27 pm)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, Jack Steiner, (Wed Dec 8, 8:50 pm)
Re: [RFC - V2] - Mapping ACPI tables as CACHED, Len Brown, (Wed Dec 8, 11:12 pm)