-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Walk: enforce
MAX_STAT
during ScanDirectory()
As a quick kludge, this commit creates a copy of ScanDirectory() as a coroutine so we can `co_await resume_stat` (we stillneed the synchronous version for method Start()). The coroutine copy can then enforce `MAX_STAT` to limit the io_uring statx() concurrency; this is necessary because cache directories with millions of cached files would cause the kernel to consume gigabytes of memory and exceed our memory limit.
- Loading branch information
1 parent
e5b7550
commit 7d39829
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cm4all-cash (0.5) unstable; urgency=low | ||
|
||
* | ||
* throttle scanning huge directories (reduce memory usage) | ||
|
||
-- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters