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

runtime: madvdontneed documentation is confusing #53525

Closed
Jorropo opened this issue Jun 24, 2022 · 3 comments
Closed

runtime: madvdontneed documentation is confusing #53525

Jorropo opened this issue Jun 24, 2022 · 3 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@Jorropo
Copy link
Contributor

Jorropo commented Jun 24, 2022

In runtime we can read:

madvdontneed: setting madvdontneed=0 will use MADV_FREE
instead of MADV_DONTNEED on Linux when returning memory to the
kernel. This is more efficient, but means RSS numbers will
drop only when the OS is under memory pressure.

I find the This here very confusing, I read this as madvdontneed=0 (MADV_FREE fast but bad RSS and MADV_DONTNEED slow but accurate) since it's the option explained in the previous sentence while in reality it's speaking about madvdontneed=1.

I belive This should just be replaced with MADV_DONTNEED or DONTNEED.

@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 24, 2022
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jun 24, 2022
@ianlancetaylor
Copy link
Contributor

ianlancetaylor commented Jun 24, 2022

CC @mknyszek

@mknyszek
Copy link
Contributor

mknyszek commented Jun 24, 2022

I'm not sure I understand your confusion. "This" is indeed referring to madvdontneed=0 as per your original interpretation; MADV_FREE is more efficient, but RSS numbers won't necessarily reflect what's been returned.

Though, I don't have anything against replacing "This" with MADV_FREE either.

@Jorropo
Copy link
Contributor Author

Jorropo commented Jun 27, 2022

@mknyszek thx you are right I confused them.
This then make this sentence correct, I don't think it need to be changed.

@Jorropo Jorropo closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants