mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
ida: Move ida_bitmap to a percpu variable
When we preload the IDA, we allocate an IDA bitmap. Instead of storing that preallocated bitmap in the IDA, we store it in a percpu variable. Generally there are more IDAs in the system than CPUs, so this cuts down on the number of preallocated bitmaps that are unused, and about half of the IDA users did not call ida_destroy() so they were leaking IDA bitmaps. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
This commit is contained in:
parent
0a835c4f09
commit
7ad3d4d85c
5 changed files with 51 additions and 45 deletions
|
@ -24,6 +24,4 @@
|
|||
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
#define xchg(ptr, x) uatomic_xchg(ptr, x)
|
||||
|
||||
#endif /* _KERNEL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue