public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Matan Barak
	<matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC ABI 0/8] Netlink-based IOCTLs RDMA ABI
Date: Thu, 26 May 2016 17:36:12 -0600	[thread overview]
Message-ID: <20160526233612.GA4396@obsidianresearch.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373AB05BB5D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Thu, May 26, 2016 at 10:53:35PM +0000, Hefty, Sean wrote:
> Ideally, the number of calls to copy to/from user should be minimized.

I'd say we should avoid memory allocation first and if that takes more
copy calls then so be it. Our existing model uses many copy from user
calls and that is considered OK. Memory allocation is clearly more
expensive than a few copy setups.

I would be very sad if our new API required allocations on every
ioctl.

The idea with a sgl is that the core would check it with access_ok,
just like we do today, and then the implementation would
copy_from_user directly to the stack, like how the header scheme vs
data scheme works today. The attraction is we can keep with an
attribute type model without having to copy the whole buffer to parse
the attribute structure.

The main problem with the current scheme is that it is hard to add
variable sized things like addresses without opencoding that
everywhere. It is also hard to express what the kernel supports, and
doesn't well support 'optional' things.

This is where I see the attraction of the attribute id labeled buffer.

If we don't want to have attributes, then copy the basic current
scheme of single shared in/out buffer..

Or maybe do both <shrug>

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

  parent reply	other threads:[~2016-05-26 23:36 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 14:35 [RFC ABI 0/8] Netlink-based IOCTLs RDMA ABI Leon Romanovsky
     [not found] ` <1464100526-31730-1-git-send-email-leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-24 14:35   ` [RFC ABI 1/8] IB/core: Export RDMA IOCTL declarations Leon Romanovsky
     [not found]     ` <1464100526-31730-2-git-send-email-leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-24 19:46       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB05008A-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 19:49           ` Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 2/8] lib/nlattr: Add parsing netlink and validate using callback Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 3/8] IB/core: Adding netlink based udata Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 4/8] IB/core: Add DIRECT ioctl call to vendor Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 5/8] IB/core: Add new ioctl for VERBS commands with netlink style parsing Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 6/8] IB/core: Add outptr to udata in order to track the output size Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 7/8] IB/core: Refactor idr to a shared file Leon Romanovsky
2016-05-24 14:35   ` [RFC ABI 8/8] IB/core: Implement device_create with the new ABI Leon Romanovsky
     [not found]     ` <1464100526-31730-9-git-send-email-leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-24 20:04       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB0500F1-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 21:53           ` Jason Gunthorpe
     [not found]             ` <20160524215335.GE7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 22:02               ` Hefty, Sean
     [not found]                 ` <1828884A29C6694DAF28B7E6B8A82373AB05024F-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 22:11                   ` Jason Gunthorpe
     [not found]                     ` <20160524221118.GG7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 22:24                       ` Hefty, Sean
2016-05-24 22:07       ` Jason Gunthorpe
     [not found]         ` <20160524220720.GF7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-26  6:00           ` Leon Romanovsky
2016-05-26 13:24           ` Matan Barak
     [not found]             ` <CAAKD3BDVFs4rivq1qEih-Z5uOMSVp=OuwDaVroK=UjAhcj6wsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-26 17:30               ` Jason Gunthorpe
2016-05-24 19:37   ` [RFC ABI 0/8] Netlink-based IOCTLs RDMA ABI Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373AB05004F-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 21:01       ` Jason Gunthorpe
     [not found]         ` <20160524210132.GB7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 21:16           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373AB0501E2-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 21:31               ` Steve Wise
2016-05-24 21:49               ` Jason Gunthorpe
     [not found]                 ` <20160524214951.GC7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 21:59                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373AB05023F-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 22:30                       ` Jason Gunthorpe
     [not found]                         ` <20160524223052.GI7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 22:44                           ` Hefty, Sean
2016-05-26 15:18                           ` Matan Barak
     [not found]                             ` <CAAKD3BA3fxgHwSXg__9LAPo7E4-7NY7h7Gea5+1GCg11ydn2kQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-26 17:22                               ` Jason Gunthorpe
     [not found]                                 ` <20160526172244.GC27115-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-26 22:53                                   ` Hefty, Sean
     [not found]                                     ` <1828884A29C6694DAF28B7E6B8A82373AB05BB5D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-26 23:36                                       ` Jason Gunthorpe [this message]
     [not found]                                         ` <20160526233612.GA4396-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-27  0:46                                           ` Hefty, Sean
     [not found]                                             ` <1828884A29C6694DAF28B7E6B8A82373AB05BC0C-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-27 13:19                                               ` Leon Romanovsky
     [not found]                                                 ` <20160527131956.GY25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-27 15:04                                                   ` Hefty, Sean
     [not found]                                                     ` <1828884A29C6694DAF28B7E6B8A82373AB05BD12-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-29  8:16                                                       ` Leon Romanovsky
     [not found]                                                         ` <20160529081646.GA25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-31 17:56                                                           ` Hefty, Sean
     [not found]                                                             ` <1828884A29C6694DAF28B7E6B8A82373AB05CA92-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-31 18:10                                                               ` Leon Romanovsky
     [not found]                                                                 ` <20160531181012.GD7477-2ukJVAZIZ/Y@public.gmane.org>
2016-05-31 20:01                                                                   ` Hefty, Sean
     [not found]                                                                     ` <1828884A29C6694DAF28B7E6B8A82373AB05CBD5-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-06-01 11:18                                                                       ` Leon Romanovsky
2016-05-25 13:14       ` Leon Romanovsky

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=20160526233612.GA4396@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox