Skip to content

ACPI/OSL: Rework of ACPICA memory OSLs to improve performance.

Lv Zheng linux-acpi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ACPI/OSL: Split memory operation region implementations to a seperate file.drivers/acpi/Makefile drivers/acpi/mem.c drivers/acpi/osl.c+396 -3820 replies
2/6ACPI/OSL: Rename system memory functions.drivers/acpi/mem.c+22 -160 replies
3/6ACPI/OSL: Cleanup memory access functions by merging duplicate code.drivers/acpi/mem.c+2 -110 replies
4/6ACPI/OSL: Add acpi_map2virt() to merge duplicate code.drivers/acpi/mem.c+20 -250 replies
5/6ACPI/OSL: Cleanup branch logics.drivers/acpi/mem.c+3 -50 replies
6/6ACPI/OSL: Fix performance issue in system memory lockings.drivers/acpi/mem.c+58 -290 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchFei Yang
1/6T-b
2/6T-b
3/6T-b
4/6T-b
5/6T-b
6/6Reported-and-tested-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] ACPI/OSL: Rework of ACPICA memory OSLs to improve performance.

It is reported that there is a performance issue in the ACPICA OSL implementation around memory mappings.

On the reported platforms, there is a debugging facility implemented in the ACPI namespace using circular logging buffer:

        Name (DPTR, 0x3AFEB000)
        Name (EPTR, 0x3AFFB000)
        Name (CPTR, 0x3AFEB010)
        Mutex (MMUT, 0x00)
        Method (MDBG, 1, Serialized)
        {
            Store (Acquire (MMUT, 0x03E8), Local0)
            If (Local0 == Zero)
            {
                OperationRegion (ABLK, SystemMemory, CPTR, 0x10)
                Field (ABLK, ByteAcc, NoLock, Preserve)
                {
                    AAAA,   128
                }
                Store (Arg0, AAAA) /* \MDBG.AAAA */
                CPTR = (CPTR + 0x10) /* \CPTR */
                If (CPTR >= EPTR)
                {
                    CPTR = (DPTR + 0x10) /* \CPTR */
                }
                Release (MMUT)
            }
            Return (Local0)
        }

This function is heavily invoked by other ACPI control methods. The reported platforms suffer from 2-5 minutes kernel stuck in the end of accessing the mapped circular buffer system memory region. By instrumentation, the 2-5 minutes time consumption overhead can be seen to happen on the synchronize_rcu() invoked in the acpi_os_unmap_memory().

This patchset removes the synchronize_rcu() from the hot path to improve the performance.

Lv Zheng (6):
ACPI/OSL: Split memory operation region implementations to a seperate
file.
ACPI/OSL: Rename system memory functions.
ACPI/OSL: Cleanup memory access functions by merging duplicate code. ACPI/OSL: Add acpi_map2virt() to merge duplicate code. ACPI/OSL: Cleanup branch logics.
ACPI/OSL: Fix performance issue in system memory lockings.

 drivers/acpi/Makefile |    2 +-
 drivers/acpi/mem.c    |  414 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/osl.c    |  381 ---------------------------------------------
 3 files changed, 415 insertions(+), 382 deletions(-)
 create mode 100644 drivers/acpi/mem.c
Signature · 1 line
1.7.10