Skip to content

Commit a8c29a7

Browse files
amotinbehlendorf
authored andcommitted
Linux: Reclaim unused spl_kmem_cache_reclaim
It is unused for 3 years since #10576. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #15507
1 parent f135936 commit a8c29a7

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

include/os/linux/spl/sys/kmem_cache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ typedef enum kmem_cbrc {
7070
#define KMC_REAP_CHUNK INT_MAX
7171
#define KMC_DEFAULT_SEEKS 1
7272

73-
#define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */
74-
7573
extern struct list_head spl_kmem_cache_list;
7674
extern struct rw_semaphore spl_kmem_cache_sem;
7775

man/man4/spl.4

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ for use by the kmem caches.
3131
For the majority of systems and workloads only a small number of threads are
3232
required.
3333
.
34-
.It Sy spl_kmem_cache_reclaim Ns = Ns Sy 0 Pq uint
35-
When this is set it prevents Linux from being able to rapidly reclaim all the
36-
memory held by the kmem caches.
37-
This may be useful in circumstances where it's preferable that Linux
38-
reclaim memory from some other subsystem first.
39-
Setting this will increase the likelihood out of memory events on a memory
40-
constrained system.
41-
.
4234
.It Sy spl_kmem_cache_obj_per_slab Ns = Ns Sy 8 Pq uint
4335
The preferred number of objects per slab in the cache.
4436
In general, a larger value will increase the caches memory footprint

module/os/linux/spl/spl-kmem-cache.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ module_param(spl_kmem_cache_magazine_size, uint, 0444);
7676
MODULE_PARM_DESC(spl_kmem_cache_magazine_size,
7777
"Default magazine size (2-256), set automatically (0)");
7878

79-
/*
80-
* The default behavior is to report the number of objects remaining in the
81-
* cache. This allows the Linux VM to repeatedly reclaim objects from the
82-
* cache when memory is low satisfy other memory allocations. Alternately,
83-
* setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache
84-
* is reclaimed. This may increase the likelihood of out of memory events.
85-
*/
86-
static unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */;
87-
module_param(spl_kmem_cache_reclaim, uint, 0644);
88-
MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)");
89-
9079
static unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB;
9180
module_param(spl_kmem_cache_obj_per_slab, uint, 0644);
9281
MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab");

0 commit comments

Comments
 (0)