blob: d3b2254cfadd1f6c04550a293854fc94314e0229 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
.. SPDX-License-Identifier: GPL-2.0+
.. Copyright 2023, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
blkcache command
================
Synopsis
--------
::
blkcache show
blkcache configure <blocks> <entries>
Description
-----------
The *blkcache* command is used to control the size of the block cache and to
display statistics.
The block cache buffers data read from block devices. This speeds up the access
to file-systems.
show
show and reset statistics
configure
set the maximum number of cache entries and the maximum number of blocks per
entry
blocks
maximum number of blocks per cache entry. The block size is device specific.
The initial value is 8.
entries
maximum number of entries in the cche. The initial value is 32.
Example
-------
.. code-block::
=> blkcache show
hits: 296
misses: 149
entries: 7
max blocks/entry: 8
max cache entries: 32
=> blkcache show
hits: 0
misses: 0
entries: 7
max blocks/entry: 8
max cache entries: 32
=> blkcache configure 16 64
changed to max of 64 entries of 16 blocks each
=> blkcache show
hits: 0
misses: 0
entries: 0
max blocks/entry: 16
max cache entries: 64
=>
Configuration
-------------
The blkcache command is only available if CONFIG_CMD_BLOCK_CACHE=y.
Return code
-----------
If the command succeeds, the return code $? is set 0 (true). In case of an
error the return code is set to 1 (false).
|