linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dalessandro, Dennis" <dennis.dalessandro@intel.com>
To: "pandit.parav@gmail.com" <pandit.parav@gmail.com>,
	"leon@kernel.org" <leon@kernel.org>
Cc: "lizefan@huawei.com" <lizefan@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
	"ogerlitz@mellanox.com" <ogerlitz@mellanox.com>,
	"hch@lst.de" <hch@lst.de>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	"haggaie@mellanox.com" <haggaie@mellanox.com>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"Hefty, Sean" <sean.hefty@intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"james.l.morris@oracle.com" <james.l.morris@oracle.com>,
	"tj@kernel.org" <tj@kernel.org>,
	"liranl@mellanox.com" <liranl@mellanox.com>,
	"jgunthorpe@obsidianresearch.com"
	<jgunthorpe@obsidianresearch.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"matanb@mellanox.com" <matanb@mellanox.com>,
	"serge@hallyn.com" <serge@hallyn.com>
Subject: Re: [PATCHv12 1/3] rdmacg: Added rdma cgroup controller
Date: Mon, 19 Sep 2016 13:10:23 +0000	[thread overview]
Message-ID: <1474290618.6520.23.camel@intel.com> (raw)
In-Reply-To: <CAG53R5X4stfy5+Jmg+XReUJqt56Z-zABK+UEswHW1dXhH-9cNw@mail.gmail.com>

On Wed, 2016-09-14 at 12:36 +0530, Parav Pandit wrote:
> Hi Dennis,
> 
> Do you know how would HFI1 driver would work along with rdma cgroup?

Keep in mind HFI1 driver has two "modes" of operation. We support
verbs, and would surely fall in line with whatever cgroups do for IB
core. For our psm interface, not sure how cgroups would come into play.
Psm is designed to expose the hw to user and avoid the kernel when
possible adding more kernel control is sort of contrary to that.

Now that being said, Christoph recently made mention of maybe having a
drivers/psm [1]. I really haven't had a chance to think about the
implications of that, but maybe it's worth considering, after all we
have two implementations, qib and hfi1. So anyway I'm not sure we need
to be too concerned about cgroups right now as far as psm side of
things goes.

Depending how things shake out for the uAPI rewrite, or verbs 2.0 or
whatever we are calling it today things may change.

[1] http://marc.info/?l=linux-rdma&m=147401714313831&w=2

-Denny

> Hi Matan, Leon, Jason,
> Apart from HFI1, is there any other concern?
> Or Patch is good to go?
> 
> 4.8 dates are close by (2 weeks) and there are two git trees involved
> (that might cause merge error to Linus) so if there are no issues, I
> would like to make request to Doug to consider it for 4.8 early on.
> 
> Parav
> 
> On Mon, Sep 12, 2016 at 10:37 AM, Leon Romanovsky <leon@kernel.org>
> wrote:
> > On Sun, Sep 11, 2016 at 11:52:35AM -0600, Jason Gunthorpe wrote:
> > > On Sun, Sep 11, 2016 at 07:24:45PM +0200, Christoph Hellwig
> > > wrote:
> > > > > > > I've posted some initial work toward a) a while ago, and
> > > > > > > once we
> > > > > 
> > > > > Did it get merged? Do you have a pointer?
> > > > 
> > > > http://www.spinics.net/lists/linux-rdma/msg31958.html
> > > 
> > > Right, I remember that. Certainly the right direction
> > > 
> > > > > However, everything under verbs is not straightforward. The
> > > > > files in
> > > > > userspace are not copies...
> > > > > 
> > > > > user:
> > > > > 
> > > > > struct ibv_query_device {
> > > > >        __u32 command;
> > > > >        __u16 in_words;
> > > > >        __u16 out_words;
> > > > >        __u64 response;
> > > > >        __u64 driver_data[0];
> > > > > };
> > > > > 
> > > > > kernel:
> > > > > 
> > > > > struct ib_uverbs_query_device {
> > > > >         __u64 response;
> > > > >         __u64 driver_data[0];
> > > > > };
> > > > 
> > > > We'll obviously need different strutures for the libibvers API
> > > > and the kernel interface in this case, and we'll need to figure
> > > > out
> > > > how to properly translate them.  I think a cast, plus compile
> > > > time
> > > > type checking ala BUILD_BUG_ON is the way to go.
> > > 
> > > I'm not sure I follow, which would I cast?
> > > 
> > > BUILD_BUG_ON(sizeof(ibv_query_device) ==
> > > sizeof(ib_uverbs_cmd_hdr) +
> > >              sizeof(ib_uverbs_query_device))
> > > 
> > > ?
> > > 
> > > > > I'm thinking the best way forward might be to use a script
> > > > > and
> > > > > transform userspace into:
> > > > > 
> > > > > struct ibv_query_device {
> > > > >   struct ib_uverbs_cmd_hdr hdr;
> > > > >   struct ib_uverbs_query_device cmd;
> > > > > };
> > > > 
> > > > That would break the users of the interface.
> > > 
> > > Sorry, I mean doing this inside rdma-plumbing. Since the change
> > > is ABI
> > > identical the modified libibverbs would still be binary
> > > compatible
> > > with all providers but not source compatible. Since all kernel
> > > supported providers are in rdma-plumbing we can add the '.cmd.'
> > > at the
> > > same time.
> > > 
> > > The kernel uapi header would stay the same.
> > > 
> > > > However automatically generating the user ABI from the kernel
> > > > one
> > > > might still be a good idea in the long run.
> > > 
> > > My preference would be to try and use the kernel headers
> > > directly.
> > 
> > I thought the same, especially after realizing that they are almost
> > copy/paste from the vendor *-abi.h files.
> > 
> > > 
> > > Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" 
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-09-19 13:24 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31  8:37 [PATCHv12 0/3] rdmacg: IB/core: rdma controller support Parav Pandit
2016-08-31  8:37 ` [PATCHv12 1/3] rdmacg: Added rdma cgroup controller Parav Pandit
2016-08-31  9:38   ` Leon Romanovsky
2016-09-07 15:07     ` Parav Pandit
2016-09-08  6:12       ` Leon Romanovsky
2016-09-08 10:20         ` Parav Pandit
2016-08-31 15:07   ` Matan Barak
2016-08-31 21:16     ` Tejun Heo
2016-09-01  7:25       ` Matan Barak
2016-09-01  8:44         ` Christoph Hellwig
2016-09-07  7:55           ` Parav Pandit
2016-09-07  8:51             ` Matan Barak
2016-09-07 14:54               ` Parav Pandit
2016-09-10 16:14               ` Christoph Hellwig
2016-09-10 17:01                 ` Jason Gunthorpe
2016-09-11  8:07                   ` Matan Barak
2016-09-11 13:34                   ` Christoph Hellwig
2016-09-11 14:35                     ` Leon Romanovsky
2016-09-11 17:14                       ` Jason Gunthorpe
2016-09-11 17:24                         ` Christoph Hellwig
2016-09-11 17:52                           ` Jason Gunthorpe
2016-09-12  5:07                             ` Leon Romanovsky
2016-09-14  7:06                               ` Parav Pandit
2016-09-14  8:14                                 ` Matan Barak
2016-09-14  9:19                                   ` Parav Pandit
2016-09-15 18:56                                 ` Leon Romanovsky
2016-09-21  4:43                                   ` Parav Pandit
2016-09-21 14:26                                     ` Tejun Heo
2016-09-21 16:02                                       ` Parav Pandit
2016-10-04 18:19                                         ` Parav Pandit
2016-10-05  6:37                                           ` Christoph Hellwig
2016-10-05 11:22                                             ` Leon Romanovsky
2016-10-05 15:36                                               ` Tejun Heo
2016-10-06 12:55                                             ` Parav Pandit
2016-10-18 20:15                                           ` Parav Pandit
2016-09-19 13:10                                 ` Dalessandro, Dennis [this message]
2016-09-19 17:00                                   ` Parav Pandit
2016-09-10 16:12             ` Christoph Hellwig
2016-09-11  7:40               ` Matan Barak
2016-08-31  8:37 ` [PATCHv12 2/3] IB/core: added support to use " Parav Pandit
2016-08-31  8:37 ` [PATCHv12 3/3] rdmacg: Added documentation for rdmacg Parav Pandit
2016-08-31 13:56 ` [PATCHv12 0/3] rdmacg: IB/core: rdma controller support Tejun Heo
2016-10-05 11:22 ` Leon Romanovsky
2016-10-06 12:59   ` Parav Pandit

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=1474290618.6520.23.camel@intel.com \
    --to=dennis.dalessandro@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=dledford@redhat.com \
    --cc=haggaie@mellanox.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@lst.de \
    --cc=james.l.morris@oracle.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=liranl@mellanox.com \
    --cc=lizefan@huawei.com \
    --cc=matanb@mellanox.com \
    --cc=ogerlitz@mellanox.com \
    --cc=pandit.parav@gmail.com \
    --cc=sean.hefty@intel.com \
    --cc=serge@hallyn.com \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).