Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
36c9ea98
Commit
36c9ea98
authored
Jun 03, 2013
by
Kent Overstreet
Committed by
Kent Overstreet
Jul 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcache: Document shrinker reserve better
Signed-off-by:
Kent Overstreet
<
kmo@daterainc.com
>
parent
e49c7c37
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
drivers/md/bcache/btree.c
drivers/md/bcache/btree.c
+7
-0
No files found.
drivers/md/bcache/btree.c
View file @
36c9ea98
...
...
@@ -622,6 +622,13 @@ static int bch_mca_shrink(struct shrinker *shrink, struct shrink_control *sc)
else
if
(
!
mutex_trylock
(
&
c
->
bucket_lock
))
return
-
1
;
/*
* It's _really_ critical that we don't free too many btree nodes - we
* have to always leave ourselves a reserve. The reserve is how we
* guarantee that allocating memory for a new btree node can always
* succeed, so that inserting keys into the btree can always succeed and
* IO can always make forward progress:
*/
nr
/=
c
->
btree_pages
;
nr
=
min_t
(
unsigned
long
,
nr
,
mca_can_free
(
c
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment