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

Don't read meminfo if there are no shrinkers #10

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@modelrockettier

modelrockettier commented Aug 24, 2018

If no shrinkers have been registered, there is no reason to read /proc/meminfo.

This allows some commands to run without needing the /proc filesystem to be mounted including format, show-super, unlock, --help, and version.

Since list_empty only does a simple pointer comparison, it seemed unnecessary to take the shrinker_lock.
(See urcu/list.h)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment