util,gallium: put count in pipe_resource & sampler_view on its own cache line

This adds 60 bytes to both structures. It eliminates "False Sharing"
for atomic operations (see wikipedia).

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11618>
This commit is contained in:
Marek Olšák
2021-06-27 17:55:29 -04:00
committed by Marge Bot
parent b34a3459f8
commit 8c6e18bc51
8 changed files with 35 additions and 8 deletions

View File

@@ -477,4 +477,7 @@ typedef int lock_cap_t;
#endif
/* TODO: this could be different on non-x86 architectures. */
#define CACHE_LINE_SIZE 64
#endif /* UTIL_MACROS_H */