From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Date: Fri, 14 Oct 2016 17:19:34 -0600 [thread overview]
Message-ID: <20161014231934.GC16509@obsidianresearch.com> (raw)
In-Reply-To: <20161014192136.11731-3-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Fri, Oct 14, 2016 at 03:21:34PM -0400, Jarod Wilson wrote:
> Red Hat has been shipping an "rdma" package, as well as it's own systemd
> unit files for some daemons for a while now, in both Fedora and Red Hat
> Enterprise Linux. Some of these are fairly RH-specific, but might be of
> use to others, so we'd like to move them into the upstream source tree.
We have a directory called 'debian', so lets just have one called
'redhat'..
The below comments are my view on what we should try and move into
common cross-distro locations..
Common stuff should be installed via cmake
> diff --git a/glue/redhat/ibacm.service b/glue/redhat/ibacm.service
> new file mode 100644
> index 0000000..1cd031a
> +++ b/glue/redhat/ibacm.service
Can we just put this in ibacm/ ?
> +Requires=rdma.service
> +After=rdma.service opensm.service
This is the only RH specific thiing I see.. Could we standardize on
something here and use it on all distros? rdma-available.target?
> +++ b/glue/redhat/iwpmd.service
> @@ -0,0 +1,12 @@
> +[Unit]
> +Description=Starts the IWPMD daemon
> +Documentation=file:///usr/share/doc/iwpmd/README
File does not exit? There is a man page now
We already have a iwpmd/iwpmd.service that is almost identical, can you
you just update it and drop this version?
> +++ b/glue/redhat/rdma.cxgb3.sys.modprobe
> @@ -0,0 +1 @@
> +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3
> diff --git a/glue/redhat/rdma.cxgb4.sys.modprobe b/glue/redhat/rdma.cxgb4.sys.modprobe
> new file mode 100644
> index 0000000..44163ab
> +++ b/glue/redhat/rdma.cxgb4.sys.modprobe
> @@ -0,0 +1 @@
> +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4
What are these for? Should they be cross distro? Why are only a few
drivers this special?
> +++ b/glue/redhat/rdma.fixup-mtrr.awk
> @@ -0,0 +1,160 @@
> +# This is a simple script that checks the contents of /proc/mtrr to see if
> +# the BIOS maker for the computer took the easy way out in terms of
> +# specifying memory regions when there is a hole below 4GB for PCI access
> +# and the machine has 4GB or more of RAM. When the contents of /proc/mtrr
> +# show a 4GB mapping of write-back cached RAM, minus punch out hole(s) of
> +# uncacheable regions (the area reserved for PCI access), then it becomes
> +# impossible for the ib_ipath driver to set write_combining on its PIO
> +# buffers. To correct the problem, remap the lower memory region in various
> +# chunks up to the start of the punch out hole(s), then delete the punch out
> +# hole(s) entirely as they aren't needed any more. That way, ib_ipath will
> +# be able to set write_combining on its PIO memory access region.
Yuk, a thousand times yuk.
I thought the mtrr cleanup built into modern kernel took care of this?
Really though, this needs to be fixed upstream in the kernel :|
> diff --git a/glue/redhat/rdma.kernel-init b/glue/redhat/rdma.kernel-init
> new file mode 100644
> index 0000000..6cb4732
> +++ b/glue/redhat/rdma.kernel-init
I wonder if this could be split into a generic 'load the modules' part
and a distro specific part? Every distro needs systemd to load the
extra modules because out auto-loading is broken - IMHO, and that is
pretty complex unfortunately.
> +errata_58()
> +{
> + # Check AMD chipset issue Errata #58
> + if test -x /sbin/lspci && test -x /sbin/setpci; then
> + if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) &&
> + ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) &&
> + ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then
> + CURVAL=`/sbin/setpci -d 1022:1100 69`
Another yuk. Why isn't this handled upstream in drivers/pci/quirks.c
with the rest of the 8131 errata?
Fortunately I expect all 8131 hardware is long since gone, that chip
was end-of-manufacturing'd very quickly 2003ish IIRC.
> +++ b/glue/redhat/rdma.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel
> +Documentation=file:/etc/rdma/rdma.conf
> +RefuseManualStop=true
> +DefaultDependencies=false
> +Conflicts=emergency.target emergency.service
> +Before=network.target remote-fs-pre.target
This is an area we really need to cross-distro standardize - we really
need a set of rdma-*.targets.
eg
rdma-available.target
- RDMA hardware is available and all prep is done
opensm (if installed) is started, etc
Use in place of rdma.service
rdma-detected.target
- udev detected rdma hardware
> +++ b/glue/redhat/rdma.udev-ipoib-naming.rules
> @@ -0,0 +1,13 @@
> +# This is a sample udev rules file that demonstrates how to get udev to
> +# set the name of IPoIB interfaces to whatever you wish. There is a
> +# 16 character limit on network device names though, so don't go too nuts
> +#
> +# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the
> +# ATTR{address} match must start with ?* and only reference the last 8
> +# bytes of the address or else the address might not match on any given
> +# start of the IPoIB stack
> +#
> +# Note: as of rhel7, udev is case sensitive on the address field match
> +# and all addresses need to be in lower case.
> +#
> +# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
This should be a cross distro file.
> +++ b/glue/redhat/rdma.udev-rules
> @@ -0,0 +1,18 @@
> +# We list all the various kernel modules that drive hardware in the
> +# InfiniBand stack (and a few in the network stack that might not actually
> +# be RDMA capable, but we don't know that at this time and it's safe to
> +# enable the IB stack, so do so unilaterally) and on load of any of that
> +# hardware, we trigger the rdma.service load in systemd
> +
> +SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
> +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
> +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
> +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
> +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
> +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
Also cross distro
> +# When we detect a new verbs device is added to the system, set the node
> +# description on that device
> +# If rdma-ndd is installed, defer the setting of the node description to it.
> +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"
Shouldn't this udev drop-in by in the rdma-ndd package?
> +++ b/glue/redhat/srp_daemon.service
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=Start or stop the daemon that attaches to SRP devices
> +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf
> +DefaultDependencies=false
> +Conflicts=emergency.target emergency.service
> +Requires=rdma.service
> +Wants=opensm.service
> +After=rdma.service opensm.service
> +After=network.target
> +Before=remote-fs-pre.target
Also should be common, why does it reference opensm.service?
> +
> +[Service]
> +Type=simple
> +ExecStart=/usr/sbin/srp_daemon.sh
Hurm, someday we have to make better systemd integration for these
daemons..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-10-14 23:19 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 19:21 [PATCH rdma-core 0/4] rdma-core infrastructure Jarod Wilson
[not found] ` <20161014192136.11731-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-14 19:21 ` [PATCH rdma-core 1/4] rpm spec: install documentation too Jarod Wilson
[not found] ` <20161014192136.11731-2-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-14 22:52 ` Jason Gunthorpe
[not found] ` <20161014225204.GB16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 15:53 ` Jarod Wilson
2016-10-14 19:21 ` [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits Jarod Wilson
[not found] ` <20161014192136.11731-3-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-14 23:19 ` Jason Gunthorpe [this message]
[not found] ` <20161014231934.GC16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-16 14:40 ` Doug Ledford
[not found] ` <1e03ceea-5584-6bbb-6fbe-e11d9d251649-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 17:31 ` Jason Gunthorpe
2016-10-17 16:22 ` Jarod Wilson
[not found] ` <20161017162221.GI14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 17:46 ` Jason Gunthorpe
[not found] ` <20161017174611.GB6430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 18:20 ` Jarod Wilson
[not found] ` <20161017182037.GK14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 18:56 ` Doug Ledford
[not found] ` <a6c8091e-fe83-8413-77d7-4aac053b8e62-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 19:14 ` Jason Gunthorpe
2016-10-17 18:56 ` Jason Gunthorpe
[not found] ` <20161017185657.GA8122-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 19:10 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E24F0A408-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-17 20:13 ` Jason Gunthorpe
[not found] ` <20161017201309.GA24291-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-18 14:51 ` Jarod Wilson
[not found] ` <20161018145104.GT14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-19 18:38 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E24F0DF57-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-19 18:59 ` Jason Gunthorpe
[not found] ` <20161019185920.GA20600-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-19 21:35 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E24F0E288-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-19 22:55 ` Weiny, Ira
2016-10-20 3:50 ` Jason Gunthorpe
[not found] ` <20161020035054.GB28678-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-20 4:20 ` Weiny, Ira
2016-10-14 19:21 ` [PATCH rdma-core 3/4] glue/redhat: copy stock spec for RH customization Jarod Wilson
2016-10-14 19:21 ` [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages Jarod Wilson
[not found] ` <20161014192136.11731-5-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-14 23:39 ` Jason Gunthorpe
[not found] ` <20161014233904.GD16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 18:45 ` Jarod Wilson
[not found] ` <20161017184506.GL14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 19:07 ` Jason Gunthorpe
[not found] ` <20161017190705.GB8122-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-18 14:44 ` Jarod Wilson
[not found] ` <20161018144411.GS14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-18 19:28 ` Jason Gunthorpe
2016-10-14 22:33 ` [PATCH rdma-core 0/4] rdma-core infrastructure Jason Gunthorpe
[not found] ` <20161014223308.GA16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 15:43 ` Jarod Wilson
2016-10-15 9:26 ` Leon Romanovsky
[not found] ` <20161015092619.GJ9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-17 15:51 ` Jarod Wilson
[not found] ` <20161017155159.GG14983-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-17 16:11 ` Jason Gunthorpe
[not found] ` <20161017161154.GB5679-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-17 16:26 ` Jarod Wilson
2016-10-20 15:33 ` [PATCH rdma-core v2 0/4] rdma-core redhat/ infrastructure Jarod Wilson
[not found] ` <20161020153357.27286-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-20 15:33 ` [PATCH rdma-core v2 1/4] Install end user focused documentation files Jarod Wilson
2016-10-20 15:33 ` [PATCH rdma-core v2 2/4] redhat: add udev/systemd/etc infrastructure bits Jarod Wilson
2016-10-20 15:33 ` [PATCH rdma-core v2 3/4] redhat: copy stock spec for RH customization Jarod Wilson
2016-10-20 15:33 ` [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages Jarod Wilson
[not found] ` <20161020153357.27286-5-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-27 21:10 ` Jason Gunthorpe
[not found] ` <20161027211059.GA7224-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-28 17:11 ` Jarod Wilson
[not found] ` <20161028171147.GJ42084-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-28 17:25 ` Jason Gunthorpe
[not found] ` <20161028172503.GA28451-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-28 20:57 ` Jason Gunthorpe
2016-10-28 21:55 ` Jarod Wilson
2016-11-03 20:35 ` Doug Ledford
[not found] ` <581B9F91.4050407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-04 0:42 ` Jason Gunthorpe
[not found] ` <20161104004213.GA28485-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-07 17:23 ` [PATCH rdma-core] redhat/spec: add back strict librdmacm Requires Jarod Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161014231934.GC16509@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.