Skip to contentSkip to conversation

Question on "arm64: mm: Prototype to allow drivers to request PBHA values"

DISCUSSION mawupeng 2 participants 3 messages Feb 3, 2023 – Feb 7, 2023

lore
Share & tools
lore

mawupeng

author
#0 lore raw

Hi James Morse,

Thanks for your work on working out what linux needs to support to make use of existing SoCs using PBHA[1]. In your example, PBHA can be use memory compression or system-cache.

This patch set is perfect and covers a wide range of scenarios. What's you follow-up plan for this patch set?

In this patch set, devicetree is using to pass the pbha-performance-only and pbha-no-aliases attributes to the OS. Since ACPI may be used to do such work and there is no suitable acpi table to represent these attributes at early acpi parse stage.

Do you have any idea on how to pass these pbha related attributes via ACPI?

[1]: https://lore.kernel.org/all/[email protected]/t/#u

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#1 lore raw

Hi mawupeng,

Quoted 6 lines · mawupeng

Thanks for your work on working out what linux needs to support to make use of existing SoCs using PBHA[1]. In your example, PBHA can be use memory compression or system-cache.

This patch set is perfect and covers a wide range of scenarios. What's you follow-up plan for this patch set?

I was hoping we could collect together what PBHA is being used for in existing SoCs, to work out which of those things we can support in mainline.

Marc Z had some additional questions on IO and DMA.

Quoted 7 lines

In this patch set, devicetree is using to pass the pbha-performance-only and pbha-no-aliases attributes to the OS. Since ACPI may be used to do such work and there is no suitable acpi table to represent these attributes at early acpi parse stage.

Do you have any idea on how to pass these pbha related attributes via ACPI?

The DT binding exists to tell the OS which PBHA values only affect performance, and which ones mean the page can only be mapped once.

There is no standard ACPI method that conveys this. I guess the ACPI people would specify a GUID for each property, then return a Package() of values from something like a _DSM on _SB. (...if that is allowed...).

But! Without more of a story about what PBHA is used for, including IO and DMA - as well as upstream drivers that use it, I think any ACPI support will be premature.

Can you share what your SoC uses PBHA for, what drivers need to use it. What happens if its not supported? (is this a 0.1% performance change, or 10%?). What happens if devices access those memory locations? (do they need configuring with PBHA bits too?)

Thanks,

James

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#2 lore raw
Quoted 31 lines · James Morse

Hi mawupeng,

Quoted 6 lines · mawupeng

Thanks for your work on working out what linux needs to support to make use of existing SoCs using PBHA[1]. In your example, PBHA can be use memory compression or system-cache.

This patch set is perfect and covers a wide range of scenarios. What's you follow-up plan for this patch set?

I was hoping we could collect together what PBHA is being used for in existing SoCs, to work out which of those things we can support in mainline.

Marc Z had some additional questions on IO and DMA.

Quoted 7 lines

In this patch set, devicetree is using to pass the pbha-performance-only and pbha-no-aliases attributes to the OS. Since ACPI may be used to do such work and there is no suitable acpi table to represent these attributes at early acpi parse stage.

Do you have any idea on how to pass these pbha related attributes via ACPI?

The DT binding exists to tell the OS which PBHA values only affect performance, and which ones mean the page can only be mapped once.

There is no standard ACPI method that conveys this. I guess the ACPI people would specify a GUID for each property, then return a Package() of values from something like a _DSM on _SB. (...if that is allowed...).

Quoted 7 lines

But! Without more of a story about what PBHA is used for, including IO and DMA - as well as upstream drivers that use it, I think any ACPI support will be premature.

Can you share what your SoC uses PBHA for, what drivers need to use it. What happens if its not supported? (is this a 0.1% performance change, or 10%?). What happens if devices access those memory locations? (do they need configuring with PBHA bits too?)

Thanks for your reply.

We want to make a cache used by user tasks in OS(not dirvers), addition PTE flag for kernel page table shoule be introduced in pte. Since there are no avilable bit free in pte and PBHA can be used for such work.

We have already disscussed with the hardware them, cache consistency is ensured by hardware. So there maybe no problem with IO and DMA in this scenario.

This is just some very early work, but we need to mark sure can be used in the latest OS.

Thanks,

Ma Wupeng.

Quoted 7 lines

Thanks,

James

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel