summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-07-10 00:26:07 +0000
committerRichard Yao <ryao@gentoo.org>2012-07-10 00:26:07 +0000
commitb373e31f3f7556f3caabef9c270d989e4ebf52e3 (patch)
treebfd0f29ccec8c3ef492a8331b5629fa325e552db /sys-kernel/spl
parentKeyword amd64-linux, x86-linux, updated home page and download url (diff)
downloadhistorical-b373e31f3f7556f3caabef9c270d989e4ebf52e3.tar.gz
historical-b373e31f3f7556f3caabef9c270d989e4ebf52e3.tar.bz2
historical-b373e31f3f7556f3caabef9c270d989e4ebf52e3.zip
Make KM_SLEEP an alias of KM_PUSHPAGE like it is in FreeBSD
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'sys-kernel/spl')
-rw-r--r--sys-kernel/spl/ChangeLog9
-rw-r--r--sys-kernel/spl/Manifest6
-rw-r--r--sys-kernel/spl/files/spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch56
-rw-r--r--sys-kernel/spl/spl-0.6.0_rc9-r2.ebuild91
-rw-r--r--sys-kernel/spl/spl-9999.ebuild3
5 files changed, 161 insertions, 4 deletions
diff --git a/sys-kernel/spl/ChangeLog b/sys-kernel/spl/ChangeLog
index 1789eb30b02e..f3ae644c73a1 100644
--- a/sys-kernel/spl/ChangeLog
+++ b/sys-kernel/spl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-kernel/spl
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.21 2012/06/25 17:54:06 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.22 2012/07/10 00:26:07 ryao Exp $
+
+*spl-0.6.0_rc9-r2 (10 Jul 2012)
+
+ 10 Jul 2012; Richard Yao <ryao@gentoo.org>
+ +files/spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch,
+ +spl-0.6.0_rc9-r2.ebuild, spl-9999.ebuild:
+ Make KM_SLEEP an alias of KM_PUSHPAGE like it is in FreeBSD
*spl-0.6.0_rc9-r1 (25 Jun 2012)
diff --git a/sys-kernel/spl/Manifest b/sys-kernel/spl/Manifest
index d68bded93694..f6b122bb74e1 100644
--- a/sys-kernel/spl/Manifest
+++ b/sys-kernel/spl/Manifest
@@ -1,7 +1,9 @@
+AUX spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch 2071 RMD160 bdfee4b1bf700bc3d0a375dcbb6181034fc1a417 SHA1 3de9a4379b36f9b5fed5b0eeea99fa1b5cd47242 SHA256 d34d56201046c6464141c50c815a956e200260c4b17a057af2dde6fdb5fcf949
AUX spl-0.6.0_rc9-constify-free-functions.patch 2973 RMD160 29bf9d0882baffb879a0dbd21cb1a792cd57ecc4 SHA1 fddb143b6f10c67138c967ec39a62bad76bdf522 SHA256 161a292a104e9ffc386da6c5924927db5721c4745378f865e46fd803d5250314
AUX spl-0.6.0_rc9-detect-kernel-honors-gfp-flags.patch 2896 RMD160 857c1dd3705dc6a19b1610e96b9fac3ae8f1de45 SHA1 2255e43e72aca0194eaca79f641e4aa10b635fda SHA256 811d8db0a99b26af03be5150eb9c6ac970933a34f022980d275a86bf4947aed1
DIST spl-0.6.0-rc9.tar.gz 449444 RMD160 50673f08253d5939f84dfe09e66c409b15d553a9 SHA1 c4c0ba92652f4635a3e0ffe62de68f9e4bd59a4c SHA256 9b1f7d0c94e3b70942f460d726180c3bed0b6b6cd71fc90d4d52dc6b218d17dd
EBUILD spl-0.6.0_rc9-r1.ebuild 2121 RMD160 5402e844d86e9ee3359deac6c5f2963eb8afc89a SHA1 5ea460bf13873af86b0f64e4e4d7c8c975a6a717 SHA256 be70b8ba3537badd93282b243c2d3270c4fd2dbde75bbc9208d03c284a719e5c
-EBUILD spl-9999.ebuild 2114 RMD160 f5130b4dd4d84c7a806de5264fe6ee43e48dc60f SHA1 6d688131bb2f3d4f382d0f3e0786af412065340d SHA256 dd628d62480bd7b24cd13e21762f2e5d39b189adcddca4eb39a47265be83b512
-MISC ChangeLog 2980 RMD160 b659b11bce38ae869a676905fcb6b0c224d0ce42 SHA1 70dcdbf613ca56984714c4d9121a41fc3d511309 SHA256 65f4cce6441c765b02a705a999a4ecbb097efa7d7c5c2e9e895790ad055f85e1
+EBUILD spl-0.6.0_rc9-r2.ebuild 2187 RMD160 57f4eb921be4dc325536dddc57cd6852d656cb35 SHA1 eb94be16cb6ec7c8e7506ba7cf4a7c277318d6e3 SHA256 0c63b1ddfb9edbadf9a26b2ad38a4579acf4c52201cd063d4540ee7861ffe4bf
+EBUILD spl-9999.ebuild 2180 RMD160 d29b8fdec947741708aa282dd7409b8d2554bc7c SHA1 2aada7f75cba69b1814c33f7b7994f507fc9dfa9 SHA256 0a7be8eccb1725ee5a90dfb0d657ee53885fe4e8b0881c063219a37ff5570e56
+MISC ChangeLog 3228 RMD160 224bbc7880e4ccfbd35be844b916a599d1cf793f SHA1 ee8d36dc7c4bcf63ca3a30309dacc60090052c17 SHA256 485a82379b9a42d7829751017b1cf8ee2ff272b08da43217c1b1f2fdf8c5c934
MISC metadata.xml 228 RMD160 7f4566d402fa232a1d2bb22589d7fe8cc72a241c SHA1 9a2f59b4e342ac0f1e064255f59b0bdec32ab1a9 SHA256 a317cd066ed83c5b5acf9d49869cb2f153499bb90cee389334bee9781534f5e8
diff --git a/sys-kernel/spl/files/spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch b/sys-kernel/spl/files/spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch
new file mode 100644
index 000000000000..fb0e5914e773
--- /dev/null
+++ b/sys-kernel/spl/files/spl-0.6.0_rc9-alias-km-sleep-with-km-pushpage.patch
@@ -0,0 +1,56 @@
+From 5c072b45b66e841ebc7952db7860c2ee7b024b08 Mon Sep 17 00:00:00 2001
+From: Richard Yao <ryao@cs.stonybrook.edu>
+Date: Mon, 25 Jun 2012 20:05:00 -0400
+Subject: [PATCH] Make KM_SLEEP an alias of KM_PUSHPAGE Use GFP_NOIO in
+ KM_SLEEP
+
+This should prevent direct reclaim issues without requiring
+Linux-specific changes to code from Solaris. This is what is done in
+FreeBSD.
+
+Note that a change to __taskq_dispatch() module/spl/spl-taskq.c is
+needed to make this work. Changing KM_PUSHPAGE to use GFP_NOIO is fine,
+but adding __GFP_HIGH to that triggers a hard-coded panic in
+__taskq_dispatch() during zvol initialization. Removing the hard coded
+panic has no ill effects.
+
+Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
+---
+ include/sys/kmem.h | 2 +-
+ module/spl/spl-taskq.c | 7 ++++---
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/include/sys/kmem.h b/include/sys/kmem.h
+index 796af44..633278b 100644
+--- a/include/sys/kmem.h
++++ b/include/sys/kmem.h
+@@ -41,7 +41,7 @@
+ /*
+ * Memory allocation interfaces
+ */
+-#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */
++#define KM_SLEEP (GFP_NOIO | __GFP_HIGH) /* Can sleep, never fails */
+ #define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */
+ #define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */
+ #define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */
+diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c
+index 0c546c7..5ab387e 100644
+--- a/module/spl/spl-taskq.c
++++ b/module/spl/spl-taskq.c
+@@ -255,9 +255,10 @@
+ if (!(flags & (TQ_SLEEP | TQ_NOSLEEP)))
+ flags |= TQ_SLEEP;
+
+- if (unlikely(in_atomic() && (flags & TQ_SLEEP)))
+- PANIC("May schedule while atomic: %s/0x%08x/%d\n",
+- current->comm, preempt_count(), current->pid);
++ /* FIXME: Why does this fail when KM_SLEEP contains __GFP_HIGHMEM? */
++ //if (unlikely(in_atomic() && (flags & TQ_SLEEP)))
++ // PANIC("May schedule while atomic: %s/0x%08x/%d\n",
++ // current->comm, preempt_count(), current->pid);
+
+ spin_lock_irqsave(&tq->tq_lock, tq->tq_lock_flags);
+
+--
+1.7.10
+
diff --git a/sys-kernel/spl/spl-0.6.0_rc9-r2.ebuild b/sys-kernel/spl/spl-0.6.0_rc9-r2.ebuild
new file mode 100644
index 000000000000..39ab00567ef2
--- /dev/null
+++ b/sys-kernel/spl/spl-0.6.0_rc9-r2.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc9-r2.ebuild,v 1.1 2012/07/10 00:26:07 ryao Exp $
+
+EAPI="4"
+AUTOTOOLS_AUTORECONF="1"
+
+inherit flag-o-matic linux-mod autotools-utils
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
+else
+ inherit eutils versionator
+ MY_PV=$(replace_version_separator 3 '-')
+ SRC_URI="https://github.com/downloads/zfsonlinux/${PN}/${PN}-${MY_PV}.tar.gz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+IUSE="custom-cflags debug"
+
+RDEPEND="!sys-devel/spl"
+
+AT_M4DIR="config"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+pkg_setup() {
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ !GRKERNSEC_HIDESYM
+ !PREEMPT
+ !PREEMPT_VOLUNTARY
+ MODULES
+ KALLSYMS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+ kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
+ check_extra_config
+}
+
+src_prepare() {
+ # Workaround for hard coded path
+ sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die
+
+ if [ ${PV} != "9999" ]
+ then
+ epatch "${FILESDIR}/${P}-detect-kernel-honors-gfp-flags.patch"
+ epatch "${FILESDIR}/${P}-constify-free-functions.patch"
+ epatch "${FILESDIR}/${P}-alias-km-sleep-with-km-pushpage.patch"
+ fi
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ set_arch_to_kernel
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=all
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+ autotools-utils_src_configure
+}
+
+src_test() {
+ if [[ ! -e /proc/modules ]]
+ then
+ die "Missing /proc/modules"
+ elif [[ $UID -ne 0 ]]
+ then
+ ewarn "Cannot run make check tests with FEATURES=userpriv."
+ ewarn "Skipping make check tests."
+ elif grep -q '^spl ' /proc/modules
+ then
+ ewarn "Cannot run make check tests with module spl loaded."
+ ewarn "Skipping make check tests."
+ else
+ autotools-utils_src_test
+ fi
+}
diff --git a/sys-kernel/spl/spl-9999.ebuild b/sys-kernel/spl/spl-9999.ebuild
index 5dd693a9623e..1b482f6d4c80 100644
--- a/sys-kernel/spl/spl-9999.ebuild
+++ b/sys-kernel/spl/spl-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.19 2012/06/25 17:54:06 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.20 2012/07/10 00:26:07 ryao Exp $
EAPI="4"
AUTOTOOLS_AUTORECONF="1"
@@ -53,6 +53,7 @@ src_prepare() {
then
epatch "${FILESDIR}/${P}-detect-kernel-honors-gfp-flags.patch"
epatch "${FILESDIR}/${P}-constify-free-functions.patch"
+ epatch "${FILESDIR}/${P}-alias-km-sleep-with-km-pushpage.patch"
fi
autotools-utils_src_prepare