License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 17:07:57 +03:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2005-11-04 10:43:35 +03:00
|
|
|
#
|
|
|
|
# Block layer core configuration
|
|
|
|
#
|
2007-07-10 14:24:11 +04:00
|
|
|
menuconfig BLOCK
|
2011-01-21 01:44:16 +03:00
|
|
|
bool "Enable the block layer" if EXPERT
|
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 22:45:40 +04:00
|
|
|
default y
|
2023-08-01 20:22:00 +03:00
|
|
|
select FS_IOMAP
|
2016-09-17 17:38:44 +03:00
|
|
|
select SBITMAP
|
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 22:45:40 +04:00
|
|
|
help
|
2008-04-21 11:51:04 +04:00
|
|
|
Provide block layer support for the kernel.
|
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 22:45:40 +04:00
|
|
|
|
2008-04-21 11:51:04 +04:00
|
|
|
Disable this option to remove the block layer support from the
|
|
|
|
kernel. This may be useful for embedded devices.
|
|
|
|
|
|
|
|
If this option is disabled:
|
|
|
|
|
|
|
|
- block device files will become unusable
|
|
|
|
- some filesystems (such as ext3) will become unavailable.
|
|
|
|
|
|
|
|
Also, SCSI character devices and USB storage will be disabled since
|
|
|
|
they make use of various block layer definitions and facilities.
|
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 22:45:40 +04:00
|
|
|
|
|
|
|
Say Y here unless you know you really don't want to mount disks and
|
|
|
|
suchlike.
|
|
|
|
|
|
|
|
if BLOCK
|
2005-11-04 10:43:35 +03:00
|
|
|
|
2022-01-04 10:16:47 +03:00
|
|
|
config BLOCK_LEGACY_AUTOLOAD
|
|
|
|
bool "Legacy autoloading support"
|
2022-02-25 21:14:40 +03:00
|
|
|
default y
|
2022-01-04 10:16:47 +03:00
|
|
|
help
|
|
|
|
Enable loading modules and creating block device instances based on
|
|
|
|
accesses through their device special file. This is a historic Linux
|
|
|
|
feature and makes no sense in a udev world where device files are
|
2022-02-25 21:14:40 +03:00
|
|
|
created on demand, but scripts that manually create device nodes and
|
|
|
|
then call losetup might rely on this behavior.
|
2022-01-04 10:16:47 +03:00
|
|
|
|
2019-08-29 01:05:57 +03:00
|
|
|
config BLK_RQ_ALLOC_TIME
|
|
|
|
bool
|
|
|
|
|
2019-11-07 22:18:04 +03:00
|
|
|
config BLK_CGROUP_RWSTAT
|
|
|
|
bool
|
|
|
|
|
2023-03-27 03:49:53 +03:00
|
|
|
config BLK_CGROUP_PUNT_BIO
|
|
|
|
bool
|
|
|
|
|
2021-07-24 10:20:23 +03:00
|
|
|
config BLK_DEV_BSG_COMMON
|
|
|
|
tristate
|
2007-07-09 14:38:05 +04:00
|
|
|
|
2021-12-09 09:31:31 +03:00
|
|
|
config BLK_ICQ
|
|
|
|
bool
|
|
|
|
|
2011-08-01 00:05:09 +04:00
|
|
|
config BLK_DEV_BSGLIB
|
|
|
|
bool "Block layer SG support v4 helper lib"
|
2021-07-24 10:20:23 +03:00
|
|
|
select BLK_DEV_BSG_COMMON
|
2011-08-01 00:05:09 +04:00
|
|
|
help
|
|
|
|
Subsystems will normally enable this if needed. Users will not
|
|
|
|
normally need to manually enable this.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2008-06-30 22:04:41 +04:00
|
|
|
config BLK_DEV_INTEGRITY
|
|
|
|
bool "Block layer data integrity support"
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2008-06-30 22:04:41 +04:00
|
|
|
Some storage devices allow extra information to be
|
|
|
|
stored/retrieved to help protect the data. The block layer
|
|
|
|
data integrity option provides hooks which can be used by
|
|
|
|
filesystems to ensure better data integrity.
|
|
|
|
|
|
|
|
Say yes here if you have a storage device that provides the
|
|
|
|
T10/SCSI Data Integrity Field or the T13/ATA External Path
|
|
|
|
Protection. If in doubt, say N.
|
|
|
|
|
2019-12-23 11:13:51 +03:00
|
|
|
config BLK_DEV_INTEGRITY_T10
|
|
|
|
tristate
|
|
|
|
depends on BLK_DEV_INTEGRITY
|
|
|
|
select CRC_T10DIF
|
2022-03-03 23:13:11 +03:00
|
|
|
select CRC64_ROCKSOFT
|
2019-12-23 11:13:51 +03:00
|
|
|
|
2016-10-18 09:40:33 +03:00
|
|
|
config BLK_DEV_ZONED
|
|
|
|
bool "Zoned block device support"
|
2019-06-04 10:23:40 +03:00
|
|
|
select MQ_IOSCHED_DEADLINE
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2016-10-18 09:40:33 +03:00
|
|
|
Block layer zoned block device support. This option enables
|
2020-06-29 22:06:41 +03:00
|
|
|
support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
|
|
|
|
devices.
|
2016-10-18 09:40:33 +03:00
|
|
|
|
2020-06-29 22:06:41 +03:00
|
|
|
Say yes here if you have a ZAC, ZBC, or ZNS storage device.
|
2016-10-18 09:40:33 +03:00
|
|
|
|
2010-09-16 01:06:35 +04:00
|
|
|
config BLK_DEV_THROTTLING
|
|
|
|
bool "Block layer bio throttling support"
|
2021-09-27 16:59:57 +03:00
|
|
|
depends on BLK_CGROUP
|
2019-11-07 22:18:04 +03:00
|
|
|
select BLK_CGROUP_RWSTAT
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2010-09-16 01:06:35 +04:00
|
|
|
Block layer bio throttling support. It can be used to limit
|
|
|
|
the IO rate to a device. IO rate policies are per cgroup and
|
|
|
|
one needs to mount and use blkio cgroup controller for creating
|
|
|
|
cgroups and specifying per device IO rate policies.
|
|
|
|
|
2019-06-27 19:08:35 +03:00
|
|
|
See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
|
2010-09-16 01:06:35 +04:00
|
|
|
|
2017-03-27 20:51:31 +03:00
|
|
|
config BLK_DEV_THROTTLING_LOW
|
|
|
|
bool "Block throttling .low limit interface support (EXPERIMENTAL)"
|
|
|
|
depends on BLK_DEV_THROTTLING
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2017-03-27 20:51:31 +03:00
|
|
|
Add .low limit interface for block throttling. The low limit is a best
|
|
|
|
effort limit to prioritize cgroups. Depending on the setting, the limit
|
|
|
|
can be used to protect cgroups in terms of bandwidth/iops and better
|
|
|
|
utilize disk resource.
|
|
|
|
|
|
|
|
Note, this is an experimental interface and could be changed someday.
|
|
|
|
|
block: hook up writeback throttling
Enable throttling of buffered writeback to make it a lot
more smooth, and has way less impact on other system activity.
Background writeback should be, by definition, background
activity. The fact that we flush huge bundles of it at the time
means that it potentially has heavy impacts on foreground workloads,
which isn't ideal. We can't easily limit the sizes of writes that
we do, since that would impact file system layout in the presence
of delayed allocation. So just throttle back buffered writeback,
unless someone is waiting for it.
The algorithm for when to throttle takes its inspiration in the
CoDel networking scheduling algorithm. Like CoDel, blk-wb monitors
the minimum latencies of requests over a window of time. In that
window of time, if the minimum latency of any request exceeds a
given target, then a scale count is incremented and the queue depth
is shrunk. The next monitoring window is shrunk accordingly. Unlike
CoDel, if we hit a window that exhibits good behavior, then we
simply increment the scale count and re-calculate the limits for that
scale value. This prevents us from oscillating between a
close-to-ideal value and max all the time, instead remaining in the
windows where we get good behavior.
Unlike CoDel, blk-wb allows the scale count to to negative. This
happens if we primarily have writes going on. Unlike positive
scale counts, this doesn't change the size of the monitoring window.
When the heavy writers finish, blk-bw quickly snaps back to it's
stable state of a zero scale count.
The patch registers a sysfs entry, 'wb_lat_usec'. This sets the latency
target to me met. It defaults to 2 msec for non-rotational storage, and
75 msec for rotational storage. Setting this value to '0' disables
blk-wb. Generally, a user would not have to touch this setting.
We don't enable WBT on devices that are managed with CFQ, and have
a non-root block cgroup attached. If we have a proportional share setup
on this particular disk, then the wbt throttling will interfere with
that. We don't have a strong need for wbt for that case, since we will
rely on CFQ doing that for us.
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-09 22:38:14 +03:00
|
|
|
config BLK_WBT
|
|
|
|
bool "Enable support for block device writeback throttling"
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
block: hook up writeback throttling
Enable throttling of buffered writeback to make it a lot
more smooth, and has way less impact on other system activity.
Background writeback should be, by definition, background
activity. The fact that we flush huge bundles of it at the time
means that it potentially has heavy impacts on foreground workloads,
which isn't ideal. We can't easily limit the sizes of writes that
we do, since that would impact file system layout in the presence
of delayed allocation. So just throttle back buffered writeback,
unless someone is waiting for it.
The algorithm for when to throttle takes its inspiration in the
CoDel networking scheduling algorithm. Like CoDel, blk-wb monitors
the minimum latencies of requests over a window of time. In that
window of time, if the minimum latency of any request exceeds a
given target, then a scale count is incremented and the queue depth
is shrunk. The next monitoring window is shrunk accordingly. Unlike
CoDel, if we hit a window that exhibits good behavior, then we
simply increment the scale count and re-calculate the limits for that
scale value. This prevents us from oscillating between a
close-to-ideal value and max all the time, instead remaining in the
windows where we get good behavior.
Unlike CoDel, blk-wb allows the scale count to to negative. This
happens if we primarily have writes going on. Unlike positive
scale counts, this doesn't change the size of the monitoring window.
When the heavy writers finish, blk-bw quickly snaps back to it's
stable state of a zero scale count.
The patch registers a sysfs entry, 'wb_lat_usec'. This sets the latency
target to me met. It defaults to 2 msec for non-rotational storage, and
75 msec for rotational storage. Setting this value to '0' disables
blk-wb. Generally, a user would not have to touch this setting.
We don't enable WBT on devices that are managed with CFQ, and have
a non-root block cgroup attached. If we have a proportional share setup
on this particular disk, then the wbt throttling will interfere with
that. We don't have a strong need for wbt for that case, since we will
rely on CFQ doing that for us.
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-09 22:38:14 +03:00
|
|
|
Enabling this option enables the block layer to throttle buffered
|
|
|
|
background writeback from the VM, making it more smooth and having
|
|
|
|
less impact on foreground operations. The throttling is done
|
|
|
|
dynamically on an algorithm loosely based on CoDel, factoring in
|
|
|
|
the realtime performance of the disk.
|
|
|
|
|
2021-06-18 03:44:41 +03:00
|
|
|
config BLK_WBT_MQ
|
|
|
|
bool "Enable writeback throttling by default"
|
|
|
|
default y
|
|
|
|
depends on BLK_WBT
|
|
|
|
help
|
|
|
|
Enable writeback throttling by default for request-based block devices.
|
|
|
|
|
2018-07-03 18:15:01 +03:00
|
|
|
config BLK_CGROUP_IOLATENCY
|
|
|
|
bool "Enable support for latency based cgroup IO protection"
|
2021-09-27 16:59:57 +03:00
|
|
|
depends on BLK_CGROUP
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2018-07-03 18:15:01 +03:00
|
|
|
Enabling this option enables the .latency interface for IO throttling.
|
|
|
|
The IO controller will attempt to maintain average IO latencies below
|
|
|
|
the configured latency target, throttling anybody with a higher latency
|
|
|
|
target than the victimized group.
|
|
|
|
|
|
|
|
Note, this is an experimental interface and could be changed someday.
|
|
|
|
|
2021-06-08 07:35:45 +03:00
|
|
|
config BLK_CGROUP_FC_APPID
|
|
|
|
bool "Enable support to track FC I/O Traffic across cgroup applications"
|
2021-07-03 18:58:33 +03:00
|
|
|
depends on BLK_CGROUP && NVME_FC
|
2021-06-08 07:35:45 +03:00
|
|
|
help
|
|
|
|
Enabling this option enables the support to track FC I/O traffic across
|
|
|
|
cgroup applications. It enables the Fabric and the storage targets to
|
|
|
|
identify, monitor, and handle FC traffic based on VM tags by inserting
|
|
|
|
application specific identification into the FC frame.
|
|
|
|
|
2019-08-29 01:05:58 +03:00
|
|
|
config BLK_CGROUP_IOCOST
|
|
|
|
bool "Enable support for cost model based cgroup IO controller"
|
2021-09-27 16:59:57 +03:00
|
|
|
depends on BLK_CGROUP
|
2019-08-29 01:05:58 +03:00
|
|
|
select BLK_RQ_ALLOC_TIME
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2019-08-29 01:05:58 +03:00
|
|
|
Enabling this option enables the .weight interface for cost
|
|
|
|
model based proportional IO control. The IO controller
|
|
|
|
distributes IO capacity between different groups based on
|
|
|
|
their share of the overall weight distribution.
|
|
|
|
|
2021-06-18 03:44:44 +03:00
|
|
|
config BLK_CGROUP_IOPRIO
|
|
|
|
bool "Cgroup I/O controller for assigning an I/O priority class"
|
|
|
|
depends on BLK_CGROUP
|
|
|
|
help
|
|
|
|
Enable the .prio interface for assigning an I/O priority class to
|
|
|
|
requests. The I/O priority class affects the order in which an I/O
|
|
|
|
scheduler and block devices process requests. Only some I/O schedulers
|
|
|
|
and some block devices support I/O priorities.
|
|
|
|
|
2017-01-28 01:03:01 +03:00
|
|
|
config BLK_DEBUG_FS
|
|
|
|
bool "Block layer debugging information in debugfs"
|
|
|
|
default y
|
|
|
|
depends on DEBUG_FS
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2017-01-28 01:03:01 +03:00
|
|
|
Include block layer debugging information in debugfs. This information
|
|
|
|
is mostly useful for kernel developers, but it doesn't incur any cost
|
|
|
|
at runtime.
|
|
|
|
|
|
|
|
Unless you are building a kernel for a tiny system, you should
|
|
|
|
say Y here.
|
|
|
|
|
2018-06-16 00:55:21 +03:00
|
|
|
config BLK_DEBUG_FS_ZONED
|
|
|
|
bool
|
|
|
|
default BLK_DEBUG_FS && BLK_DEV_ZONED
|
|
|
|
|
2017-02-03 22:50:31 +03:00
|
|
|
config BLK_SED_OPAL
|
|
|
|
bool "Logic for interfacing with Opal enabled SEDs"
|
2023-07-22 00:15:34 +03:00
|
|
|
depends on KEYS
|
|
|
|
select PSERIES_PLPKS if PPC_PSERIES
|
2020-06-13 19:50:22 +03:00
|
|
|
help
|
2017-02-03 22:50:31 +03:00
|
|
|
Builds Logic for interfacing with Opal enabled controllers.
|
|
|
|
Enabling this option enables users to setup/unlock/lock
|
|
|
|
Locking ranges for SED devices using the Opal protocol.
|
|
|
|
|
block: Keyslot Manager for Inline Encryption
Inline Encryption hardware allows software to specify an encryption context
(an encryption key, crypto algorithm, data unit num, data unit size) along
with a data transfer request to a storage device, and the inline encryption
hardware will use that context to en/decrypt the data. The inline
encryption hardware is part of the storage device, and it conceptually sits
on the data path between system memory and the storage device.
Inline Encryption hardware implementations often function around the
concept of "keyslots". These implementations often have a limited number
of "keyslots", each of which can hold a key (we say that a key can be
"programmed" into a keyslot). Requests made to the storage device may have
a keyslot and a data unit number associated with them, and the inline
encryption hardware will en/decrypt the data in the requests using the key
programmed into that associated keyslot and the data unit number specified
with the request.
As keyslots are limited, and programming keys may be expensive in many
implementations, and multiple requests may use exactly the same encryption
contexts, we introduce a Keyslot Manager to efficiently manage keyslots.
We also introduce a blk_crypto_key, which will represent the key that's
programmed into keyslots managed by keyslot managers. The keyslot manager
also functions as the interface that upper layers will use to program keys
into inline encryption hardware. For more information on the Keyslot
Manager, refer to documentation found in block/keyslot-manager.c and
linux/keyslot-manager.h.
Co-developed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Satya Tangirala <satyat@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-14 03:37:17 +03:00
|
|
|
config BLK_INLINE_ENCRYPTION
|
|
|
|
bool "Enable inline encryption support in block layer"
|
|
|
|
help
|
|
|
|
Build the blk-crypto subsystem. Enabling this lets the
|
|
|
|
block layer handle encryption, so users can take
|
|
|
|
advantage of inline encryption hardware if present.
|
|
|
|
|
2020-05-14 03:37:20 +03:00
|
|
|
config BLK_INLINE_ENCRYPTION_FALLBACK
|
|
|
|
bool "Enable crypto API fallback for blk-crypto"
|
|
|
|
depends on BLK_INLINE_ENCRYPTION
|
|
|
|
select CRYPTO
|
|
|
|
select CRYPTO_SKCIPHER
|
|
|
|
help
|
|
|
|
Enabling this lets the block layer handle inline encryption
|
|
|
|
by falling back to the kernel crypto API when inline
|
|
|
|
encryption hardware is not present.
|
|
|
|
|
2011-09-16 08:25:05 +04:00
|
|
|
source "block/partitions/Kconfig"
|
|
|
|
|
2016-09-19 08:50:16 +03:00
|
|
|
config BLK_MQ_PCI
|
2021-09-27 16:59:58 +03:00
|
|
|
def_bool PCI
|
2016-09-19 08:50:16 +03:00
|
|
|
|
2017-02-05 20:15:24 +03:00
|
|
|
config BLK_MQ_VIRTIO
|
|
|
|
bool
|
2021-09-27 16:59:58 +03:00
|
|
|
depends on VIRTIO
|
2017-02-05 20:15:24 +03:00
|
|
|
default y
|
|
|
|
|
2018-09-27 00:01:03 +03:00
|
|
|
config BLK_PM
|
2021-09-27 16:59:58 +03:00
|
|
|
def_bool PM
|
2018-09-27 00:01:03 +03:00
|
|
|
|
2021-08-04 12:41:40 +03:00
|
|
|
# do not use in new code
|
|
|
|
config BLOCK_HOLDER_DEPRECATED
|
|
|
|
bool
|
|
|
|
|
2022-02-15 13:05:36 +03:00
|
|
|
config BLK_MQ_STACKING
|
|
|
|
bool
|
|
|
|
|
2018-12-11 14:01:04 +03:00
|
|
|
source "block/Kconfig.iosched"
|
2021-09-27 16:59:58 +03:00
|
|
|
|
|
|
|
endif # BLOCK
|