Skip to content

Conversation

@Patrick-Pataky
Copy link

In the context of CS477: Advanced Operating Systems at EPFL, we (@AgeX21, @TizianKurz, and me) reproduced and extended linux-cache-ext as part of a class project. As part of this work, we implemented a custom admission policy based on TinyLFU.

We discovered a critical OOM bug. Specifically, when a page is not admitted into the cache, a temporary page is allocated but never freed correctly. As a result, the memory is filled in a matter of seconds in a memory intensive application.

This pull request fixes the issue by:

  • Correcting the reference count handling for temporary pages.
  • Cleaning the page allocation and freeing paths, for an easier maintenance.

In our tests, these changes eliminate the memory leak. We are happy to provide additional details if needed.

@tzussman
Copy link
Collaborator

Thanks! We were aware of this issue, but hadn't prioritized fixing it, so this is great. Will review and merge in the next few days.

Glad to hear EPFL is testing this out :) Would love to hear some more about how TinyLFU performed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants