Skip to content
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

Open
wants to merge 1 commit into
base: criu-dev
Choose a base branch
from

Conversation

fdavid-amd
Copy link
Contributor

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.

This will, by default, prevent the amdgpu plugin from
allocating more than 4G of memory at a time.

Signed-off-by: David Francis <David.Francis@amd.com>
@@ -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;
Copy link
Member

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;

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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?

@fdavid-amd
Copy link
Contributor Author

@dayatsin-amd, could you look at this?

@avagin
Copy link
Member

avagin commented Nov 17, 2023

Any updates?

@rerrabolu
Copy link
Contributor

I am not tracking this change.

Copy link

A friendly reminder that this PR had no activity for 30 days.

Copy link

A friendly reminder that this PR had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants