mbcache.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. /*
  2. * linux/fs/mbcache.c
  3. * (C) 2001-2002 Andreas Gruenbacher, <a.gruenbacher@computer.org>
  4. */
  5. /*
  6. * Filesystem Meta Information Block Cache (mbcache)
  7. *
  8. * The mbcache caches blocks of block devices that need to be located
  9. * by their device/block number, as well as by other criteria (such
  10. * as the block's contents).
  11. *
  12. * There can only be one cache entry in a cache per device and block number.
  13. * Additional indexes need not be unique in this sense. The number of
  14. * additional indexes (=other criteria) can be hardwired at compile time
  15. * or specified at cache create time.
  16. *
  17. * Each cache entry is of fixed size. An entry may be `valid' or `invalid'
  18. * in the cache. A valid entry is in the main hash tables of the cache,
  19. * and may also be in the lru list. An invalid entry is not in any hashes
  20. * or lists.
  21. *
  22. * A valid cache entry is only in the lru list if no handles refer to it.
  23. * Invalid cache entries will be freed when the last handle to the cache
  24. * entry is released. Entries that cannot be freed immediately are put
  25. * back on the lru list.
  26. */
  27. #include <linux/kernel.h>
  28. #include <linux/module.h>
  29. #include <linux/hash.h>
  30. #include <linux/fs.h>
  31. #include <linux/mm.h>
  32. #include <linux/slab.h>
  33. #include <linux/sched.h>
  34. #include <linux/init.h>
  35. #include <linux/mbcache.h>
  36. #ifdef MB_CACHE_DEBUG
  37. # define mb_debug(f...) do { \
  38. printk(KERN_DEBUG f); \
  39. printk("\n"); \
  40. } while (0)
  41. #define mb_assert(c) do { if (!(c)) \
  42. printk(KERN_ERR "assertion " #c " failed\n"); \
  43. } while(0)
  44. #else
  45. # define mb_debug(f...) do { } while(0)
  46. # define mb_assert(c) do { } while(0)
  47. #endif
  48. #define mb_error(f...) do { \
  49. printk(KERN_ERR f); \
  50. printk("\n"); \
  51. } while(0)
  52. #define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
  53. static DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
  54. MODULE_AUTHOR("Andreas Gruenbacher <a.gruenbacher@computer.org>");
  55. MODULE_DESCRIPTION("Meta block cache (for extended attributes)");
  56. MODULE_LICENSE("GPL");
  57. EXPORT_SYMBOL(mb_cache_create);
  58. EXPORT_SYMBOL(mb_cache_shrink);
  59. EXPORT_SYMBOL(mb_cache_destroy);
  60. EXPORT_SYMBOL(mb_cache_entry_alloc);
  61. EXPORT_SYMBOL(mb_cache_entry_insert);
  62. EXPORT_SYMBOL(mb_cache_entry_release);
  63. EXPORT_SYMBOL(mb_cache_entry_free);
  64. EXPORT_SYMBOL(mb_cache_entry_get);
  65. #if !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0)
  66. EXPORT_SYMBOL(mb_cache_entry_find_first);
  67. EXPORT_SYMBOL(mb_cache_entry_find_next);
  68. #endif
  69. /*
  70. * Global data: list of all mbcache's, lru list, and a spinlock for
  71. * accessing cache data structures on SMP machines. The lru list is
  72. * global across all mbcaches.
  73. */
  74. static LIST_HEAD(mb_cache_list);
  75. static LIST_HEAD(mb_cache_lru_list);
  76. static DEFINE_SPINLOCK(mb_cache_spinlock);
  77. /*
  78. * What the mbcache registers as to get shrunk dynamically.
  79. */
  80. static int mb_cache_shrink_fn(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask);
  81. static struct shrinker mb_cache_shrinker = {
  82. .shrink = mb_cache_shrink_fn,
  83. .seeks = DEFAULT_SEEKS,
  84. };
  85. static inline int
  86. __mb_cache_entry_is_hashed(struct mb_cache_entry *ce)
  87. {
  88. return !list_empty(&ce->e_block_list);
  89. }
  90. static void
  91. __mb_cache_entry_unhash(struct mb_cache_entry *ce)
  92. {
  93. if (__mb_cache_entry_is_hashed(ce)) {
  94. list_del_init(&ce->e_block_list);
  95. list_del(&ce->e_index.o_list);
  96. }
  97. }
  98. static void
  99. __mb_cache_entry_forget(struct mb_cache_entry *ce, gfp_t gfp_mask)
  100. {
  101. struct mb_cache *cache = ce->e_cache;
  102. mb_assert(!(ce->e_used || ce->e_queued));
  103. kmem_cache_free(cache->c_entry_cache, ce);
  104. atomic_dec(&cache->c_entry_count);
  105. }
  106. static void
  107. __mb_cache_entry_release_unlock(struct mb_cache_entry *ce)
  108. __releases(mb_cache_spinlock)
  109. {
  110. /* Wake up all processes queuing for this cache entry. */
  111. if (ce->e_queued)
  112. wake_up_all(&mb_cache_queue);
  113. if (ce->e_used >= MB_CACHE_WRITER)
  114. ce->e_used -= MB_CACHE_WRITER;
  115. ce->e_used--;
  116. if (!(ce->e_used || ce->e_queued)) {
  117. if (!__mb_cache_entry_is_hashed(ce))
  118. goto forget;
  119. mb_assert(list_empty(&ce->e_lru_list));
  120. list_add_tail(&ce->e_lru_list, &mb_cache_lru_list);
  121. }
  122. spin_unlock(&mb_cache_spinlock);
  123. return;
  124. forget:
  125. spin_unlock(&mb_cache_spinlock);
  126. __mb_cache_entry_forget(ce, GFP_KERNEL);
  127. }
  128. /*
  129. * mb_cache_shrink_fn() memory pressure callback
  130. *
  131. * This function is called by the kernel memory management when memory
  132. * gets low.
  133. *
  134. * @shrink: (ignored)
  135. * @nr_to_scan: Number of objects to scan
  136. * @gfp_mask: (ignored)
  137. *
  138. * Returns the number of objects which are present in the cache.
  139. */
  140. static int
  141. mb_cache_shrink_fn(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask)
  142. {
  143. LIST_HEAD(free_list);
  144. struct mb_cache *cache;
  145. struct mb_cache_entry *entry, *tmp;
  146. int count = 0;
  147. mb_debug("trying to free %d entries", nr_to_scan);
  148. spin_lock(&mb_cache_spinlock);
  149. while (nr_to_scan-- && !list_empty(&mb_cache_lru_list)) {
  150. struct mb_cache_entry *ce =
  151. list_entry(mb_cache_lru_list.next,
  152. struct mb_cache_entry, e_lru_list);
  153. list_move_tail(&ce->e_lru_list, &free_list);
  154. __mb_cache_entry_unhash(ce);
  155. }
  156. list_for_each_entry(cache, &mb_cache_list, c_cache_list) {
  157. mb_debug("cache %s (%d)", cache->c_name,
  158. atomic_read(&cache->c_entry_count));
  159. count += atomic_read(&cache->c_entry_count);
  160. }
  161. spin_unlock(&mb_cache_spinlock);
  162. list_for_each_entry_safe(entry, tmp, &free_list, e_lru_list) {
  163. __mb_cache_entry_forget(entry, gfp_mask);
  164. }
  165. return (count / 100) * sysctl_vfs_cache_pressure;
  166. }
  167. /*
  168. * mb_cache_create() create a new cache
  169. *
  170. * All entries in one cache are equal size. Cache entries may be from
  171. * multiple devices. If this is the first mbcache created, registers
  172. * the cache with kernel memory management. Returns NULL if no more
  173. * memory was available.
  174. *
  175. * @name: name of the cache (informal)
  176. * @bucket_bits: log2(number of hash buckets)
  177. */
  178. struct mb_cache *
  179. mb_cache_create(const char *name, int bucket_bits)
  180. {
  181. int n, bucket_count = 1 << bucket_bits;
  182. struct mb_cache *cache = NULL;
  183. cache = kmalloc(sizeof(struct mb_cache), GFP_KERNEL);
  184. if (!cache)
  185. return NULL;
  186. cache->c_name = name;
  187. atomic_set(&cache->c_entry_count, 0);
  188. cache->c_bucket_bits = bucket_bits;
  189. cache->c_block_hash = kmalloc(bucket_count * sizeof(struct list_head),
  190. GFP_KERNEL);
  191. if (!cache->c_block_hash)
  192. goto fail;
  193. for (n=0; n<bucket_count; n++)
  194. INIT_LIST_HEAD(&cache->c_block_hash[n]);
  195. cache->c_index_hash = kmalloc(bucket_count * sizeof(struct list_head),
  196. GFP_KERNEL);
  197. if (!cache->c_index_hash)
  198. goto fail;
  199. for (n=0; n<bucket_count; n++)
  200. INIT_LIST_HEAD(&cache->c_index_hash[n]);
  201. cache->c_entry_cache = kmem_cache_create(name,
  202. sizeof(struct mb_cache_entry), 0,
  203. SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
  204. if (!cache->c_entry_cache)
  205. goto fail2;
  206. /*
  207. * Set an upper limit on the number of cache entries so that the hash
  208. * chains won't grow too long.
  209. */
  210. cache->c_max_entries = bucket_count << 4;
  211. spin_lock(&mb_cache_spinlock);
  212. list_add(&cache->c_cache_list, &mb_cache_list);
  213. spin_unlock(&mb_cache_spinlock);
  214. return cache;
  215. fail2:
  216. kfree(cache->c_index_hash);
  217. fail:
  218. kfree(cache->c_block_hash);
  219. kfree(cache);
  220. return NULL;
  221. }
  222. /*
  223. * mb_cache_shrink()
  224. *
  225. * Removes all cache entries of a device from the cache. All cache entries
  226. * currently in use cannot be freed, and thus remain in the cache. All others
  227. * are freed.
  228. *
  229. * @bdev: which device's cache entries to shrink
  230. */
  231. void
  232. mb_cache_shrink(struct block_device *bdev)
  233. {
  234. LIST_HEAD(free_list);
  235. struct list_head *l, *ltmp;
  236. spin_lock(&mb_cache_spinlock);
  237. list_for_each_safe(l, ltmp, &mb_cache_lru_list) {
  238. struct mb_cache_entry *ce =
  239. list_entry(l, struct mb_cache_entry, e_lru_list);
  240. if (ce->e_bdev == bdev) {
  241. list_move_tail(&ce->e_lru_list, &free_list);
  242. __mb_cache_entry_unhash(ce);
  243. }
  244. }
  245. spin_unlock(&mb_cache_spinlock);
  246. list_for_each_safe(l, ltmp, &free_list) {
  247. __mb_cache_entry_forget(list_entry(l, struct mb_cache_entry,
  248. e_lru_list), GFP_KERNEL);
  249. }
  250. }
  251. /*
  252. * mb_cache_destroy()
  253. *
  254. * Shrinks the cache to its minimum possible size (hopefully 0 entries),
  255. * and then destroys it. If this was the last mbcache, un-registers the
  256. * mbcache from kernel memory management.
  257. */
  258. void
  259. mb_cache_destroy(struct mb_cache *cache)
  260. {
  261. LIST_HEAD(free_list);
  262. struct list_head *l, *ltmp;
  263. spin_lock(&mb_cache_spinlock);
  264. list_for_each_safe(l, ltmp, &mb_cache_lru_list) {
  265. struct mb_cache_entry *ce =
  266. list_entry(l, struct mb_cache_entry, e_lru_list);
  267. if (ce->e_cache == cache) {
  268. list_move_tail(&ce->e_lru_list, &free_list);
  269. __mb_cache_entry_unhash(ce);
  270. }
  271. }
  272. list_del(&cache->c_cache_list);
  273. spin_unlock(&mb_cache_spinlock);
  274. list_for_each_safe(l, ltmp, &free_list) {
  275. __mb_cache_entry_forget(list_entry(l, struct mb_cache_entry,
  276. e_lru_list), GFP_KERNEL);
  277. }
  278. if (atomic_read(&cache->c_entry_count) > 0) {
  279. mb_error("cache %s: %d orphaned entries",
  280. cache->c_name,
  281. atomic_read(&cache->c_entry_count));
  282. }
  283. kmem_cache_destroy(cache->c_entry_cache);
  284. kfree(cache->c_index_hash);
  285. kfree(cache->c_block_hash);
  286. kfree(cache);
  287. }
  288. /*
  289. * mb_cache_entry_alloc()
  290. *
  291. * Allocates a new cache entry. The new entry will not be valid initially,
  292. * and thus cannot be looked up yet. It should be filled with data, and
  293. * then inserted into the cache using mb_cache_entry_insert(). Returns NULL
  294. * if no more memory was available.
  295. */
  296. struct mb_cache_entry *
  297. mb_cache_entry_alloc(struct mb_cache *cache, gfp_t gfp_flags)
  298. {
  299. struct mb_cache_entry *ce = NULL;
  300. if (atomic_read(&cache->c_entry_count) >= cache->c_max_entries) {
  301. spin_lock(&mb_cache_spinlock);
  302. if (!list_empty(&mb_cache_lru_list)) {
  303. ce = list_entry(mb_cache_lru_list.next,
  304. struct mb_cache_entry, e_lru_list);
  305. list_del_init(&ce->e_lru_list);
  306. __mb_cache_entry_unhash(ce);
  307. }
  308. spin_unlock(&mb_cache_spinlock);
  309. }
  310. if (!ce) {
  311. ce = kmem_cache_alloc(cache->c_entry_cache, gfp_flags);
  312. if (!ce)
  313. return NULL;
  314. atomic_inc(&cache->c_entry_count);
  315. INIT_LIST_HEAD(&ce->e_lru_list);
  316. INIT_LIST_HEAD(&ce->e_block_list);
  317. ce->e_cache = cache;
  318. ce->e_queued = 0;
  319. }
  320. ce->e_used = 1 + MB_CACHE_WRITER;
  321. return ce;
  322. }
  323. /*
  324. * mb_cache_entry_insert()
  325. *
  326. * Inserts an entry that was allocated using mb_cache_entry_alloc() into
  327. * the cache. After this, the cache entry can be looked up, but is not yet
  328. * in the lru list as the caller still holds a handle to it. Returns 0 on
  329. * success, or -EBUSY if a cache entry for that device + inode exists
  330. * already (this may happen after a failed lookup, but when another process
  331. * has inserted the same cache entry in the meantime).
  332. *
  333. * @bdev: device the cache entry belongs to
  334. * @block: block number
  335. * @key: lookup key
  336. */
  337. int
  338. mb_cache_entry_insert(struct mb_cache_entry *ce, struct block_device *bdev,
  339. sector_t block, unsigned int key)
  340. {
  341. struct mb_cache *cache = ce->e_cache;
  342. unsigned int bucket;
  343. struct list_head *l;
  344. int error = -EBUSY;
  345. bucket = hash_long((unsigned long)bdev + (block & 0xffffffff),
  346. cache->c_bucket_bits);
  347. spin_lock(&mb_cache_spinlock);
  348. list_for_each_prev(l, &cache->c_block_hash[bucket]) {
  349. struct mb_cache_entry *ce =
  350. list_entry(l, struct mb_cache_entry, e_block_list);
  351. if (ce->e_bdev == bdev && ce->e_block == block)
  352. goto out;
  353. }
  354. __mb_cache_entry_unhash(ce);
  355. ce->e_bdev = bdev;
  356. ce->e_block = block;
  357. list_add(&ce->e_block_list, &cache->c_block_hash[bucket]);
  358. ce->e_index.o_key = key;
  359. bucket = hash_long(key, cache->c_bucket_bits);
  360. list_add(&ce->e_index.o_list, &cache->c_index_hash[bucket]);
  361. error = 0;
  362. out:
  363. spin_unlock(&mb_cache_spinlock);
  364. return error;
  365. }
  366. /*
  367. * mb_cache_entry_release()
  368. *
  369. * Release a handle to a cache entry. When the last handle to a cache entry
  370. * is released it is either freed (if it is invalid) or otherwise inserted
  371. * in to the lru list.
  372. */
  373. void
  374. mb_cache_entry_release(struct mb_cache_entry *ce)
  375. {
  376. spin_lock(&mb_cache_spinlock);
  377. __mb_cache_entry_release_unlock(ce);
  378. }
  379. /*
  380. * mb_cache_entry_free()
  381. *
  382. * This is equivalent to the sequence mb_cache_entry_takeout() --
  383. * mb_cache_entry_release().
  384. */
  385. void
  386. mb_cache_entry_free(struct mb_cache_entry *ce)
  387. {
  388. spin_lock(&mb_cache_spinlock);
  389. mb_assert(list_empty(&ce->e_lru_list));
  390. __mb_cache_entry_unhash(ce);
  391. __mb_cache_entry_release_unlock(ce);
  392. }
  393. /*
  394. * mb_cache_entry_get()
  395. *
  396. * Get a cache entry by device / block number. (There can only be one entry
  397. * in the cache per device and block.) Returns NULL if no such cache entry
  398. * exists. The returned cache entry is locked for exclusive access ("single
  399. * writer").
  400. */
  401. struct mb_cache_entry *
  402. mb_cache_entry_get(struct mb_cache *cache, struct block_device *bdev,
  403. sector_t block)
  404. {
  405. unsigned int bucket;
  406. struct list_head *l;
  407. struct mb_cache_entry *ce;
  408. bucket = hash_long((unsigned long)bdev + (block & 0xffffffff),
  409. cache->c_bucket_bits);
  410. spin_lock(&mb_cache_spinlock);
  411. list_for_each(l, &cache->c_block_hash[bucket]) {
  412. ce = list_entry(l, struct mb_cache_entry, e_block_list);
  413. if (ce->e_bdev == bdev && ce->e_block == block) {
  414. DEFINE_WAIT(wait);
  415. if (!list_empty(&ce->e_lru_list))
  416. list_del_init(&ce->e_lru_list);
  417. while (ce->e_used > 0) {
  418. ce->e_queued++;
  419. prepare_to_wait(&mb_cache_queue, &wait,
  420. TASK_UNINTERRUPTIBLE);
  421. spin_unlock(&mb_cache_spinlock);
  422. schedule();
  423. spin_lock(&mb_cache_spinlock);
  424. ce->e_queued--;
  425. }
  426. finish_wait(&mb_cache_queue, &wait);
  427. ce->e_used += 1 + MB_CACHE_WRITER;
  428. if (!__mb_cache_entry_is_hashed(ce)) {
  429. __mb_cache_entry_release_unlock(ce);
  430. return NULL;
  431. }
  432. goto cleanup;
  433. }
  434. }
  435. ce = NULL;
  436. cleanup:
  437. spin_unlock(&mb_cache_spinlock);
  438. return ce;
  439. }
  440. #if !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0)
  441. static struct mb_cache_entry *
  442. __mb_cache_entry_find(struct list_head *l, struct list_head *head,
  443. struct block_device *bdev, unsigned int key)
  444. {
  445. while (l != head) {
  446. struct mb_cache_entry *ce =
  447. list_entry(l, struct mb_cache_entry, e_index.o_list);
  448. if (ce->e_bdev == bdev && ce->e_index.o_key == key) {
  449. DEFINE_WAIT(wait);
  450. if (!list_empty(&ce->e_lru_list))
  451. list_del_init(&ce->e_lru_list);
  452. /* Incrementing before holding the lock gives readers
  453. priority over writers. */
  454. ce->e_used++;
  455. while (ce->e_used >= MB_CACHE_WRITER) {
  456. ce->e_queued++;
  457. prepare_to_wait(&mb_cache_queue, &wait,
  458. TASK_UNINTERRUPTIBLE);
  459. spin_unlock(&mb_cache_spinlock);
  460. schedule();
  461. spin_lock(&mb_cache_spinlock);
  462. ce->e_queued--;
  463. }
  464. finish_wait(&mb_cache_queue, &wait);
  465. if (!__mb_cache_entry_is_hashed(ce)) {
  466. __mb_cache_entry_release_unlock(ce);
  467. spin_lock(&mb_cache_spinlock);
  468. return ERR_PTR(-EAGAIN);
  469. }
  470. return ce;
  471. }
  472. l = l->next;
  473. }
  474. return NULL;
  475. }
  476. /*
  477. * mb_cache_entry_find_first()
  478. *
  479. * Find the first cache entry on a given device with a certain key in
  480. * an additional index. Additonal matches can be found with
  481. * mb_cache_entry_find_next(). Returns NULL if no match was found. The
  482. * returned cache entry is locked for shared access ("multiple readers").
  483. *
  484. * @cache: the cache to search
  485. * @bdev: the device the cache entry should belong to
  486. * @key: the key in the index
  487. */
  488. struct mb_cache_entry *
  489. mb_cache_entry_find_first(struct mb_cache *cache, struct block_device *bdev,
  490. unsigned int key)
  491. {
  492. unsigned int bucket = hash_long(key, cache->c_bucket_bits);
  493. struct list_head *l;
  494. struct mb_cache_entry *ce;
  495. spin_lock(&mb_cache_spinlock);
  496. l = cache->c_index_hash[bucket].next;
  497. ce = __mb_cache_entry_find(l, &cache->c_index_hash[bucket], bdev, key);
  498. spin_unlock(&mb_cache_spinlock);
  499. return ce;
  500. }
  501. /*
  502. * mb_cache_entry_find_next()
  503. *
  504. * Find the next cache entry on a given device with a certain key in an
  505. * additional index. Returns NULL if no match could be found. The previous
  506. * entry is atomatically released, so that mb_cache_entry_find_next() can
  507. * be called like this:
  508. *
  509. * entry = mb_cache_entry_find_first();
  510. * while (entry) {
  511. * ...
  512. * entry = mb_cache_entry_find_next(entry, ...);
  513. * }
  514. *
  515. * @prev: The previous match
  516. * @bdev: the device the cache entry should belong to
  517. * @key: the key in the index
  518. */
  519. struct mb_cache_entry *
  520. mb_cache_entry_find_next(struct mb_cache_entry *prev,
  521. struct block_device *bdev, unsigned int key)
  522. {
  523. struct mb_cache *cache = prev->e_cache;
  524. unsigned int bucket = hash_long(key, cache->c_bucket_bits);
  525. struct list_head *l;
  526. struct mb_cache_entry *ce;
  527. spin_lock(&mb_cache_spinlock);
  528. l = prev->e_index.o_list.next;
  529. ce = __mb_cache_entry_find(l, &cache->c_index_hash[bucket], bdev, key);
  530. __mb_cache_entry_release_unlock(prev);
  531. return ce;
  532. }
  533. #endif /* !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0) */
  534. static int __init init_mbcache(void)
  535. {
  536. register_shrinker(&mb_cache_shrinker);
  537. return 0;
  538. }
  539. static void __exit exit_mbcache(void)
  540. {
  541. unregister_shrinker(&mb_cache_shrinker);
  542. }
  543. module_init(init_mbcache)
  544. module_exit(exit_mbcache)