-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin: Change default max buffer size to 4G #2293
base: criu-dev
Are you sure you want to change the base?
Conversation
This will, by default, prevent the amdgpu plugin from allocating more than 4G of memory at a time. Signed-off-by: David Francis <[email protected]>
@@ -521,7 +521,7 @@ int amdgpu_plugin_init(int stage) | |||
getenv_bool("KFD_NUMA_CHECK", &kfd_numa_check); | |||
getenv_bool("KFD_CAPABILITY_CHECK", &kfd_capability_check); | |||
} | |||
kfd_max_buffer_size = 0; | |||
kfd_max_buffer_size = 4 << 30; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amdgpu_plugin.c: In function 'amdgpu_plugin_init':
50499
amdgpu_plugin.c:524:33: error: result of '4 << 30' requires 34 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=]
50500
524 | kfd_max_buffer_size = 4 << 30;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fdavid-amd I think size_t can be 32-bits depending on the compiler used. So probably safer to change
size_t kfd_max_buffer_size;
to:
uint64_t kfd_max_buffer_size;
and most of the occurrences where we use size_t to uint64_t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark the symbol as static If the symbol is used only in amdgpu_plugin.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fdavid-amd any ETA on these changes?
@dayatsin-amd, could you look at this? |
Any updates? |
I am not tracking this change. |
A friendly reminder that this PR had no activity for 30 days. |
A friendly reminder that this PR had no activity for 30 days. |
This will, by default, prevent the amdgpu plugin from allocating more than 4G of memory at a time.
This was meant to be part of a previous pull, but got dropped somewhere.