Skip to content

Commit

Permalink
Automatic merge of 'master' into merge-test (2024-09-25 18:58)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Sep 25, 2024
2 parents ef28aca + 684a64b commit b362750
Show file tree
Hide file tree
Showing 3,330 changed files with 137,381 additions and 44,986 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
*.so.dbg
*.su
*.symtypes
*.symversions
*.tab.[ch]
*.tar
*.xz
Expand All @@ -71,6 +70,7 @@ modules.order
/Module.markers
/modules.builtin
/modules.builtin.modinfo
/modules.builtin.ranges
/modules.nsdeps

#
Expand Down Expand Up @@ -144,7 +144,6 @@ GTAGS
# id-utils files
ID

*.orig
*~
\#*#

Expand Down
4 changes: 4 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Christian Brauner <[email protected]> <[email protected]>
Christian Marangi <[email protected]>
Christophe Ricard <[email protected]>
Christoph Hellwig <[email protected]>
Chuck Lever <[email protected]> <[email protected]>
Chuck Lever <[email protected]> <[email protected]>
Chuck Lever <[email protected]> <[email protected]>
Claudiu Beznea <[email protected]> <[email protected]>
Colin Ian King <[email protected]> <[email protected]>
Corey Minyard <[email protected]>
Expand Down Expand Up @@ -313,6 +316,7 @@ Jiri Slaby <[email protected]> <[email protected]>
Jisheng Zhang <[email protected]> <[email protected]>
Jisheng Zhang <[email protected]> <[email protected]>
Jishnu Prakash <[email protected]> <[email protected]>
Joel Granados <[email protected]> <[email protected]>
Johan Hovold <[email protected]> <[email protected]>
Johan Hovold <[email protected]> <[email protected]>
John Crispin <[email protected]> <[email protected]>
Expand Down
7 changes: 7 additions & 0 deletions Documentation/ABI/testing/sysfs-block-zram
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,10 @@ Contact: Sergey Senozhatsky <[email protected]>
Description:
The recompress file is write-only and triggers re-compression
with secondary compression algorithms.

What: /sys/block/zram<id>/algorithm_params
Date: August 2024
Contact: Sergey Senozhatsky <[email protected]>
Description:
The algorithm_params file is write-only and is used to setup
compression algorithm parameters.
72 changes: 72 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-pci
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,75 @@ Description:
console drivers from the device. Raw users of pci-sysfs
resourceN attributes must be terminated prior to resizing.
Success of the resizing operation is not guaranteed.

What: /sys/bus/pci/devices/.../leds/*:enclosure:*/brightness
What: /sys/class/leds/*:enclosure:*/brightness
Date: August 2024
KernelVersion: 6.12
Description:
LED indications on PCIe storage enclosures which are controlled
through the NPEM interface (Native PCIe Enclosure Management,
PCIe r6.1 sec 6.28) are accessible as led class devices, both
below /sys/class/leds and below NPEM-capable PCI devices.

Although these led class devices could be manipulated manually,
in practice they are typically manipulated automatically by an
application such as ledmon(8).

The name of a led class device is as follows:
<bdf>:enclosure:<indication>
where:

- <bdf> is the domain, bus, device and function number
(e.g. 10000:02:05.0)
- <indication> is a short description of the LED indication

Valid indications per PCIe r6.1 table 6-27 are:

- ok (drive is functioning normally)
- locate (drive is being identified by an admin)
- fail (drive is not functioning properly)
- rebuild (drive is part of an array that is rebuilding)
- pfa (drive is predicted to fail soon)
- hotspare (drive is marked to be used as a replacement)
- ica (drive is part of an array that is degraded)
- ifa (drive is part of an array that is failed)
- idt (drive is not the right type for the connector)
- disabled (drive is disabled, removal is safe)
- specific0 to specific7 (enclosure-specific indications)

Broadly, the indications fall into one of these categories:

- to signify drive state (ok, locate, fail, idt, disabled)
- to signify drive role or state in a software RAID array
(rebuild, pfa, hotspare, ica, ifa)
- to signify any other role or state (specific0 to specific7)

Mandatory indications per PCIe r6.1 sec 7.9.19.2 comprise:
ok, locate, fail, rebuild. All others are optional.
A led class device is only visible if the corresponding
indication is supported by the device.

To manipulate the indications, write 0 (LED_OFF) or 1 (LED_ON)
to the "brightness" file. Note that manipulating an indication
may implicitly manipulate other indications at the vendor's
discretion. E.g. when the user lights up the "ok" indication,
the vendor may choose to automatically turn off the "fail"
indication. The current state of an indication can be
retrieved by reading its "brightness" file.

The PCIe Base Specification allows vendors leeway to choose
different colors or blinking patterns for the indications,
but they typically follow the IBPI standard. E.g. the "locate"
indication is usually presented as one or two LEDs blinking at
4 Hz frequency:
https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation

PCI Firmware Specification r3.3 sec 4.7 defines a DSM interface
to facilitate shared access by operating system and platform
firmware to a device's NPEM registers. The kernel will use
this DSM interface where available, instead of accessing NPEM
registers directly. The DSM interface does not support the
enclosure-specific indications "specific0" to "specific7",
hence the corresponding led class devices are unavailable if
the DSM interface is used.
6 changes: 3 additions & 3 deletions Documentation/ABI/testing/sysfs-devices-memory
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ What: /sys/devices/system/memory/crash_hotplug
Date: Aug 2023
Contact: Linux kernel mailing list <[email protected]>
Description:
(RO) indicates whether or not the kernel directly supports
modifying the crash elfcorehdr for memory hot un/plug and/or
on/offline changes.
(RO) indicates whether or not the kernel updates relevant kexec
segments on memory hot un/plug and/or on/offline events, avoiding the
need to reload kdump kernel.
6 changes: 3 additions & 3 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ What: /sys/devices/system/cpu/crash_hotplug
Date: Aug 2023
Contact: Linux kernel mailing list <[email protected]>
Description:
(RO) indicates whether or not the kernel directly supports
modifying the crash elfcorehdr for CPU hot un/plug and/or
on/offline changes.
(RO) indicates whether or not the kernel updates relevant kexec
segments on memory hot un/plug and/or on/offline events, avoiding the
need to reload kdump kernel.

What: /sys/devices/system/cpu/enabled
Date: Nov 2022
Expand Down
56 changes: 56 additions & 0 deletions Documentation/ABI/testing/sysfs-fs-f2fs
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,12 @@ Description: When ATGC is on, it controls age threshold to bypass GCing young
candidates whose age is not beyond the threshold, by default it was
initialized as 604800 seconds (equals to 7 days).

What: /sys/fs/f2fs/<disk>/atgc_enabled
Date: Feb 2024
Contact: "Jinbao Liu" <[email protected]>
Description: It represents whether ATGC is on or off. The value is 1 which
indicates that ATGC is on, and 0 indicates that it is off.

What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments
Date: July 2021
Contact: "Daeho Jeong" <[email protected]>
Expand Down Expand Up @@ -763,3 +769,53 @@ Date: November 2023
Contact: "Chao Yu" <[email protected]>
Description: It controls to enable/disable IO aware feature for background discard.
By default, the value is 1 which indicates IO aware is on.

What: /sys/fs/f2fs/<disk>/blkzone_alloc_policy
Date: July 2024
Contact: "Yuanhong Liao" <[email protected]>
Description: The zone UFS we are currently using consists of two parts:
conventional zones and sequential zones. It can be used to control which part
to prioritize for writes, with a default value of 0.

======================== =========================================
value description
blkzone_alloc_policy = 0 Prioritize writing to sequential zones
blkzone_alloc_policy = 1 Only allow writing to sequential zones
blkzone_alloc_policy = 2 Prioritize writing to conventional zones
======================== =========================================

What: /sys/fs/f2fs/<disk>/migration_window_granularity
Date: September 2024
Contact: "Daeho Jeong" <[email protected]>
Description: Controls migration window granularity of garbage collection on large
section. it can control the scanning window granularity for GC migration
in a unit of segment, while migration_granularity controls the number
of segments which can be migrated at the same turn.

What: /sys/fs/f2fs/<disk>/reserved_segments
Date: September 2024
Contact: "Daeho Jeong" <[email protected]>
Description: In order to fine tune GC behavior, we can control the number of
reserved segments.

What: /sys/fs/f2fs/<disk>/gc_no_zoned_gc_percent
Date: September 2024
Contact: "Daeho Jeong" <[email protected]>
Description: If the percentage of free sections over total sections is above this
number, F2FS do not garbage collection for zoned devices through the
background GC thread. the default number is "60".

What: /sys/fs/f2fs/<disk>/gc_boost_zoned_gc_percent
Date: September 2024
Contact: "Daeho Jeong" <[email protected]>
Description: If the percentage of free sections over total sections is under this
number, F2FS boosts garbage collection for zoned devices through the
background GC thread. the default number is "25".

What: /sys/fs/f2fs/<disk>/gc_valid_thresh_ratio
Date: September 2024
Contact: "Daeho Jeong" <[email protected]>
Description: It controls the valid block ratio threshold not to trigger excessive GC
for zoned deivces. The initial value of it is 95(%). F2FS will stop the
background GC thread from intiating GC for sections having valid blocks
exceeding the ratio.
66 changes: 47 additions & 19 deletions Documentation/admin-guide/blockdev/zram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,41 @@ Examples::
#select lzo compression algorithm
echo lzo > /sys/block/zram0/comp_algorithm

For the time being, the `comp_algorithm` content does not necessarily
show every compression algorithm supported by the kernel. We keep this
list primarily to simplify device configuration and one can configure
a new device with a compression algorithm that is not listed in
`comp_algorithm`. The thing is that, internally, ZRAM uses Crypto API
and, if some of the algorithms were built as modules, it's impossible
to list all of them using, for instance, /proc/crypto or any other
method. This, however, has an advantage of permitting the usage of
custom crypto compression modules (implementing S/W or H/W compression).

4) Set Disksize
For the time being, the `comp_algorithm` content shows only compression
algorithms that are supported by zram.

4) Set compression algorithm parameters: Optional
=================================================

Compression algorithms may support specific parameters which can be
tweaked for particular dataset. ZRAM has an `algorithm_params` device
attribute which provides a per-algorithm params configuration.

For example, several compression algorithms support `level` parameter.
In addition, certain compression algorithms support pre-trained dictionaries,
which significantly change algorithms' characteristics. In order to configure
compression algorithm to use external pre-trained dictionary, pass full
path to the `dict` along with other parameters::

#pass path to pre-trained zstd dictionary
echo "algo=zstd dict=/etc/dictioary" > /sys/block/zram0/algorithm_params

#same, but using algorithm priority
echo "priority=1 dict=/etc/dictioary" > \
/sys/block/zram0/algorithm_params

#pass path to pre-trained zstd dictionary and compression level
echo "algo=zstd level=8 dict=/etc/dictioary" > \
/sys/block/zram0/algorithm_params

Parameters are algorithm specific: not all algorithms support pre-trained
dictionaries, not all algorithms support `level`. Furthermore, for certain
algorithms `level` controls the compression level (the higher the value the
better the compression ratio, it even can take negatives values for some
algorithms), for other algorithms `level` is acceleration level (the higher
the value the lower the compression ratio).

5) Set Disksize
===============

Set disk size by writing the value to sysfs node 'disksize'.
Expand All @@ -132,7 +156,7 @@ There is little point creating a zram of greater than twice the size of memory
since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the
size of the disk when not in use so a huge zram is wasteful.

5) Set memory limit: Optional
6) Set memory limit: Optional
=============================

Set memory limit by writing the value to sysfs node 'mem_limit'.
Expand All @@ -151,7 +175,7 @@ Examples::
# To disable memory limit
echo 0 > /sys/block/zram0/mem_limit

6) Activate
7) Activate
===========

::
Expand All @@ -162,7 +186,7 @@ Examples::
mkfs.ext4 /dev/zram1
mount /dev/zram1 /tmp

7) Add/remove zram devices
8) Add/remove zram devices
==========================

zram provides a control interface, which enables dynamic (on-demand) device
Expand All @@ -182,7 +206,7 @@ execute::

echo X > /sys/class/zram-control/hot_remove

8) Stats
9) Stats
========

Per-device statistics are exported as various nodes under /sys/block/zram<id>/
Expand All @@ -205,6 +229,7 @@ writeback_limit_enable RW show and set writeback_limit feature
max_comp_streams RW the number of possible concurrent compress
operations
comp_algorithm RW show and change the compression algorithm
algorithm_params WO setup compression algorithm parameters
compact WO trigger memory compaction
debug_stat RO this file is used for zram debugging purposes
backing_dev RW set up backend storage for zram to write out
Expand Down Expand Up @@ -283,15 +308,15 @@ a single line of text and contains the following stats separated by whitespace:
Unit: 4K bytes
============== =============================================================

9) Deactivate
=============
10) Deactivate
==============

::

swapoff /dev/zram0
umount /dev/zram1

10) Reset
11) Reset
=========

Write any positive value to 'reset' sysfs node::
Expand Down Expand Up @@ -487,11 +512,14 @@ registered compression algorithms, increases our chances of finding the
algorithm that successfully compresses a particular page. Sometimes, however,
it is convenient (and sometimes even necessary) to limit recompression to
only one particular algorithm so that it will not try any other algorithms.
This can be achieved by providing a algo=NAME parameter:::
This can be achieved by providing a `algo` or `priority` parameter:::

#use zstd algorithm only (if registered)
echo "type=huge algo=zstd" > /sys/block/zramX/recompress

#use zstd algorithm only (if zstd was registered under priority 1)
echo "type=huge priority=1" > /sys/block/zramX/recompress

memory tracking
===============

Expand Down
Loading

0 comments on commit b362750

Please sign in to comment.