Keep the patches in the kernel project instead of a separate one

Earlier, the patches were kept in the respective branches of a separate
project, https://abf.io/soft/kernel-patches-and-configs. And before that -
in the custom tarballs.

Now all the patches are kept here along with the spec file and are
applied the default way rather than by separate scripts. This should
make the maintenance of the patches as well as the experiments with the
new ones a lot easier.

The previous scheme seemed to offer a bit more flexibility (different
patch sets for different cases) at the cost of maintenance. But as it
turned out,  that flexibility was not worth it and was rarely used,
at most.
This commit is contained in:
Evgenii Shatokhin 2016-07-26 11:24:24 +03:00
parent 09495972a4
commit e42e28c709
15 changed files with 44401 additions and 18 deletions

View file

@ -0,0 +1,103 @@
From f54f3003586bf00ba0ee5974a92b732477b834e3 Mon Sep 17 00:00:00 2001
From: Paolo Valente <paolo.valente@unimore.it>
Date: Tue, 7 Apr 2015 13:39:12 +0200
Subject: [PATCH 1/3] block: cgroups, kconfig, build bits for BFQ-v7r11-4.5.0
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also increase the number of
policies supported by the blkio controller so that BFQ can add its
own.
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
---
block/Kconfig.iosched | 32 ++++++++++++++++++++++++++++++++
block/Makefile | 1 +
include/linux/blkdev.h | 2 +-
3 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
index 421bef9..0ee5f0f 100644
--- a/block/Kconfig.iosched
+++ b/block/Kconfig.iosched
@@ -39,6 +39,27 @@ config CFQ_GROUP_IOSCHED
---help---
Enable group IO scheduling in CFQ.
+config IOSCHED_BFQ
+ tristate "BFQ I/O scheduler"
+ default n
+ ---help---
+ The BFQ I/O scheduler tries to distribute bandwidth among
+ all processes according to their weights.
+ It aims at distributing the bandwidth as desired, independently of
+ the disk parameters and with any workload. It also tries to
+ guarantee low latency to interactive and soft real-time
+ applications. If compiled built-in (saying Y here), BFQ can
+ be configured to support hierarchical scheduling.
+
+config CGROUP_BFQIO
+ bool "BFQ hierarchical scheduling support"
+ depends on CGROUPS && IOSCHED_BFQ=y
+ default n
+ ---help---
+ Enable hierarchical scheduling in BFQ, using the cgroups
+ filesystem interface. The name of the subsystem will be
+ bfqio.
+
choice
prompt "Default I/O scheduler"
default DEFAULT_CFQ
@@ -52,6 +73,16 @@ choice
config DEFAULT_CFQ
bool "CFQ" if IOSCHED_CFQ=y
+ config DEFAULT_BFQ
+ bool "BFQ" if IOSCHED_BFQ=y
+ help
+ Selects BFQ as the default I/O scheduler which will be
+ used by default for all block devices.
+ The BFQ I/O scheduler aims at distributing the bandwidth
+ as desired, independently of the disk parameters and with
+ any workload. It also tries to guarantee low latency to
+ interactive and soft real-time applications.
+
config DEFAULT_NOOP
bool "No-op"
@@ -61,6 +92,7 @@ config DEFAULT_IOSCHED
string
default "deadline" if DEFAULT_DEADLINE
default "cfq" if DEFAULT_CFQ
+ default "bfq" if DEFAULT_BFQ
default "noop" if DEFAULT_NOOP
endmenu
diff --git a/block/Makefile b/block/Makefile
index 00ecc97..1ed86d5 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
+obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index c70e358..ae43492 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -44,7 +44,7 @@ struct pr_ops;
* Maximum number of blkcg policies allowed to be registered concurrently.
* Defined here to simplify include dependency.
*/
-#define BLKCG_MAX_POLS 2
+#define BLKCG_MAX_POLS 3
struct request;
typedef void (rq_end_io_fn)(struct request *, int);
--
1.9.1

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
>From 9f04e51293b130474504216a477bb2a73cbf59e1 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Thu, 22 Mar 2012 22:29:11 +0200
Subject: [PATCH] ata: prefer ata drivers over ide drivers when both are built
Currently the old IDE drivers are preferred over ATA drivers when both
are built, since ide/ is listed first in drivers/Makefile and therefore
the IDE drivers end up before ATA drivers in modules.order which is used
by depmod/modprobe for module ordering.
Change it so that ATA drivers are preferred over IDE driver by moving
the ide/ entry under ata/ in drivers/Makefile.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
---
drivers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 795d0ca..ff3c239 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -69,10 +69,10 @@ obj-$(CONFIG_LIBNVDIMM) += nvdimm/
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
obj-$(CONFIG_NUBUS) += nubus/
obj-y += macintosh/
-obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-y += nvme/
obj-$(CONFIG_ATA) += ata/
+obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/

View file

@ -0,0 +1,22 @@
It seems, if audit itself is not installed and therefore nothing listens
to the messages from the kernel's audit subsystem, the latter spams the
kernel log with such messages.
Let us make them debug-level and thus invisible by default.
http://bugs.rosalinux.ru/show_bug.cgi?id=6235
http://bugs.rosalinux.ru/show_bug.cgi?id=6459
diff --git a/kernel/audit.c b/kernel/audit.c
index 1c13e42..56270ce 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -396,7 +396,7 @@ static void audit_printk_skb(struct sk_buff *skb)
if (nlh->nlmsg_type != AUDIT_EOE) {
if (printk_ratelimit())
- pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
+ pr_debug("type=%d %s\n", nlh->nlmsg_type, data);
else
audit_log_lost("printk limit exceeded");
}

View file

@ -0,0 +1,21 @@
Disable floppy autoloading as it makes systems without real hw,
but that has the pnp headers hang.
See https://bugs.mageia.org/show_bug.cgi?id=4696
Signed-off-by: Thomas Backlund <tmb@mageia.org>
diff -Nurp linux-3.3.3-rc1/drivers/block/floppy.c.orig linux-3.3.3-rc1/drivers/block/floppy.c
--- linux-3.3.3-rc1/drivers/block/floppy.c.orig 2012-03-19 01:15:34.000000000 +0200
+++ linux-3.3.3-rc1/drivers/block/floppy.c 2012-04-22 02:58:10.238498303 +0300
@@ -4621,8 +4621,7 @@ static const struct pnp_device_id floppy
{"PNP0700", 0},
{}
};
-
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
#else

View file

@ -0,0 +1,49 @@
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 25 Jan 2013 17:08:03 +0100
Subject: [PATCH] drm/cirrus: Use 16bpp as default
Patch-mainline: Submitted
References: bnc#799216
We've got a bug report that GNOME on QEMU shows wrong colors.
It turned out that it's because Cairo doesn't support 24bpp well.
This hasn't been an issue until now because we (at least SUSE and
Fedora) have a patch to use 16bpp for QEMU in Xorg cirrus UMS driver.
Since cirrus KMS driver is mainly targeted for the use on QEMU/KVM, we
should choose 16bpp as default, too.
Also, it's not convenient to set the default bpp in multiple places.
cirrus_fbdev_init() should check the original preferred depth set in
cirrus_modeset_init().
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=799216
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +-
drivers/gpu/drm/cirrus/cirrus_mode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -273,7 +273,7 @@ int cirrus_fbdev_init(struct cirrus_devi
{
struct cirrus_fbdev *gfbdev;
int ret;
- int bpp_sel = 24;
+ int bpp_sel = cdev->dev->mode_config.preferred_depth;
/*bpp_sel = 8;*/
gfbdev = kzalloc(sizeof(struct cirrus_fbdev), GFP_KERNEL);
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -588,7 +588,7 @@ int cirrus_modeset_init(struct cirrus_de
cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT;
cdev->dev->mode_config.fb_base = cdev->mc.vram_base;
- cdev->dev->mode_config.preferred_depth = 24;
+ cdev->dev->mode_config.preferred_depth = 16;
/* don't prefer a shadow on virt GPU */
cdev->dev->mode_config.prefer_shadow = 0;

35794
fs-aufs4.patch Normal file

File diff suppressed because it is too large Load diff

31
hp-wmi-rfkill-fix.patch Normal file
View file

@ -0,0 +1,31 @@
This patch fixes the problem encountered on many HP laptops: in some cases,
WiFi becomes hard-blocked and cannot be unblocked since then. Seen that on
HP 6730b and others.
This is https://bugzilla.kernel.org/show_bug.cgi?id=69131
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 0669731..37000f0 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -714,6 +714,11 @@ static int __init hp_wmi_rfkill_setup(struct platform_device *device)
if (err)
return err;
+ err = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, &wireless,
+ sizeof(wireless), 0);
+ if (err)
+ return err;
+
if (wireless & 0x1) {
wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
RFKILL_TYPE_WLAN,
@@ -901,7 +906,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
wwan_rfkill = NULL;
rfkill2_count = 0;
- if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
+ if (hp_wmi_rfkill_setup(device))
hp_wmi_rfkill2_setup(device);
err = device_create_file(&device->dev, &dev_attr_display);

View file

@ -0,0 +1,19 @@
From Thierry Vignaud <tvignaud@mandriva.com> (Mandriva)
We now lacks /usr/include/linux/pci_ids.h which break ldetect build...
Can you readd it please?
Thanks
---
include/linux/Kbuild | 1 +
1 file changed, 1 insertion(+)
--- linux/include/uapi/linux/Kbuild.include-kbuild-export-pci_ids.orig
+++ linux/include/uapi/linux/Kbuild
@@ -277,6 +277,7 @@ header-y += param.h
header-y += parport.h
header-y += patchkey.h
header-y += pci.h
+header-y += pci_ids.h
header-y += pci_regs.h
header-y += perf_event.h
header-y += personality.h

View file

@ -0,0 +1,20 @@
http://bugs.rosalinux.ru/show_bug.cgi?id=4791
It seems, many applications need max_user_watches to be at least 32768.
Let us set the default value of this parameter accordingly.
Signed-off-by: Eugene A. Shatokhin <eugene.shatokhin@rosalab.ru>
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 78a2ca3..ecd1120 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -809,7 +809,7 @@ static int __init inotify_user_setup(void)
inotify_max_queued_events = 16384;
inotify_max_user_instances = 128;
- inotify_max_user_watches = 8192;
+ inotify_max_user_watches = 32768;
return 0;
}

View file

@ -22,11 +22,6 @@
# version defines
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
%define kverrel %{kversion}-%{rpmrel}
# The revision of the patchset and the configs to use. Usually, the name of
# the branch in https://abf.rosalinux.ru/soft/kernel-patches-and-configs/
# git repository.
%define revision v%{kernelversion}.%{patchlevel}.x
%define tar_ver %{kernelversion}.%{patchlevel}
%ifarch %{ix86}
@ -153,18 +148,59 @@ Source52: cpupower-start.sh
Source53: cpupower.path
Source80: kernel.rpmlintrc
####################################################################
# Our patch tarball,
# see https://abf.rosalinux.ru/soft/kernel-patches-and-configs/
Source100: https://abf.io/soft/kernel-patches-and-configs/archive/kernel-patches-and-configs-%{revision}.tar.gz
# ####################################################################
#
# Patches
# The patch to make kernel x.y.z from x.y.0.
Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.sign
# ROSA-specific patches
# Adds explicit linking of the Perf Python extension with libdl, thus fixing
# the build.
Patch100: perf-python-ext-link-with-dl.patch
# Perf docs are built after all the kernels. To validate the xml files
# generated during that process, xmlto tries to get DTD files from the Net.
# If it fails, the whole build fails, which is unfortunate. Let us avoid
# this.
Patch101: perf-xmlto-skip-validation.patch
# Bug http://bugs.rosalinux.ru/show_bug.cgi?id=4791
Patch102: inotify-increase-max-user-watches.patch
# Export pci_ids.h to user space, needed by ldetect
# TODO: is it really needed now?
Patch103: include-kbuild-export-pci_ids.patch
# http://bugs.rosalinux.ru/show_bug.cgi?id=6235
# http://bugs.rosalinux.ru/show_bug.cgi?id=6459
Patch104: audit-make-it-less-verbose.patch
# http://bugs.rosalinux.ru/show_bug.cgi?id=5649#c6
Patch105: drm-cirrus-Use-16bpp-as-default.patch
# Increase vmalloc area, https://bugs.mageia.org/show_bug.cgi?id=904
Patch106: x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch
# disable floppy autoloading (mga #4696)
Patch107: block-floppy-disable-pnp-modalias.patch
# prefer ata over ide drivers
Patch108: ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch
# AUFS from http://aufs.sourceforge.net/
Patch109: fs-aufs4.patch
# https://bugzilla.kernel.org/show_bug.cgi?id=69131
Patch110: hp-wmi-rfkill-fix.patch
# BFQ IO scheduler, http://algogroup.unimore.it/people/paolo/disk_sched/
Patch111: 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.5.0.patch
Patch112: 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.5.0.patch
Patch113: 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch
####################################################################
# Defines for the things that are needed for all the kernels
@ -540,16 +576,9 @@ should use the 'kernel-devel' package instead.
#
%prep
%setup -q -n %top_dir_name -c
%setup -q -n %top_dir_name -D -T -a100
%define patches_dir ../kernel-patches-and-configs-%{revision}/
cd %src_dir
%patch1 -p1
%{patches_dir}/scripts/apply_patches
%{patches_dir}/scripts/apply_patches-NRJ
%apply_patches
#
# Setup Begin

View file

@ -0,0 +1,22 @@
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index c868098..61c98a9 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -22,6 +22,9 @@ cflags = getenv('CFLAGS', '').split()
# switch off several checks (need to be at the end of cflags list)
cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter' ]
+libs = getenv('LIBS', '').split()
+libs += ['dl']
+
src_perf = getenv('srctree') + '/tools/perf'
build_lib = getenv('PYTHON_EXTBUILD_LIB')
build_tmp = getenv('PYTHON_EXTBUILD_TMP')
@@ -39,6 +42,7 @@ perf = Extension('perf',
include_dirs = ['util/include'],
extra_compile_args = cflags,
extra_objects = [libtraceevent, libapikfs],
+ libraries = libs,
)
setup(name='perf',

View file

@ -0,0 +1,13 @@
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 3ba1c0b..2f5070f 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -49,7 +49,7 @@ man7dir=$(mandir)/man7
ASCIIDOC=asciidoc
ASCIIDOC_EXTRA = --unsafe
MANPAGE_XSL = manpage-normal.xsl
-XMLTO_EXTRA =
+XMLTO_EXTRA = --skip-validation
INSTALL?=install
RM ?= rm -f
DOC_REF = origin/man

View file

@ -0,0 +1,28 @@
From 2db91ae7c0862bc83c1fe8b8bd14b8de3e2c02b8 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sat, 30 Apr 2011 17:09:04 +0300
Subject: [PATCH] x86: increase default minimum vmalloc area by 64MB to 192MB
This fixes issues like https://bugs.mageia.org/show_bug.cgi?id=904.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
---
arch/x86/mm/pgtable_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index cac7184..5801fb7 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -19,7 +19,7 @@
#include <asm/tlbflush.h>
#include <asm/io.h>
-unsigned int __VMALLOC_RESERVE = 128 << 20;
+unsigned int __VMALLOC_RESERVE = 192 << 20;
/*
* Associate a virtual page frame with a given physical page frame
--
1.7.3