aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorAlexander Lobakin <[email protected]>2023-08-04 20:05:27 +0200
committerJakub Kicinski <[email protected]>2023-08-07 13:05:53 -0700
commit5b899c33b3b852b9559b724cfee67801324a0886 (patch)
tree04f181ec2e4d623f1bea0f1f578a1646619ea18f /tools/perf/scripts/python/mem-phys-addr.py
parent06d0fbdad612cb8def19065cf1fa14fc34dba9f8 (diff)
net: skbuff: avoid accessing page_pool if !napi_safe when returning page
Currently, pp->p.napi is always read, but the actual variable it gets assigned to is read-only when @napi_safe is true. For the !napi_safe cases, which yet is still a pack, it's an unneeded operation. Moreover, it can lead to premature or even redundant page_pool cacheline access. For example, when page_pool_is_last_frag() returns false (with the recent frag improvements). Thus, read it only when @napi_safe is true. This also allows moving @napi inside the condition block itself. Constify it while we are here, because why not. Signed-off-by: Alexander Lobakin <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions