From: Leon Romanovsky <leon@kernel.org>
To: liweihang <liweihang@huawei.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Andrew Boyer <aboyer@pensando.io>,
"dledford@redhat.com" <dledford@redhat.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH for-next] RDMA/hns: Add interface to support lock free
Date: Sat, 14 Mar 2020 11:49:25 +0200 [thread overview]
Message-ID: <20200314094925.GE67638@unreal> (raw)
In-Reply-To: <B82435381E3B2943AA4D2826ADEF0B3A02287DC3@DGGEML502-MBS.china.huawei.com>
On Sat, Mar 14, 2020 at 03:44:49AM +0000, liweihang wrote:
> On 2020/3/13 20:18, Jason Gunthorpe wrote:
> > On Fri, Mar 13, 2020 at 06:02:20AM +0000, liweihang wrote:
> >> On 2020/3/13 1:27, Jason Gunthorpe wrote:
> >>> On Thu, Mar 12, 2020 at 01:04:05PM -0400, Andrew Boyer wrote:
> >>>> What would you say to a per-process env variable to disable locking in
> >>>> a userspace provider?
> >>>
> >>> That is also a no. verbs now has 'thread domain' who's purpose is to
> >>> allow data plane locks to be skipped.
> >>>
> >>> Generally new env vars in verbs are going to face opposition from
> >>> me.
> >>>
> >>> Jason
> >>
> >> Thanks for your comments. Do you have some suggestions on how to
> >> achieve lockless flows in kernel? Are there any similar interfaces
> >> in kernel like the thread domain in userspace?
> >
> > It has never come up before
> >
> > Jason
> >
>
> Thank you, Jason. Could you please explain why it's not encouraged to
> use module parameters in kernel?
>
> What about the reason why we shouldn't add new environment variables
> in userspace? Do they have the same reason?
No, the are discouraged for different technical reasons. There are many
reasons for not allowing them, but immediately comes into mind that
environmental variables are not thread safe, silently inherited by fork()
and have very interesting behavior in the scripts.
This makes environmental variables are the worst configuration "tool"
for the libraries.
Module parameters are bad due to inability to deprecate them, difference
between drivers that requires rewrite scripts/configs after driver/HW
change, global nature of the change and really painful experience for
the users if workload requires to change those defaults.
Thanks
>
> Weihang
next prev parent reply other threads:[~2020-03-15 2:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 7:48 [PATCH for-next] RDMA/hns: Add interface to support lock free Weihang Li
2020-03-12 9:26 ` Leon Romanovsky
2020-03-12 17:02 ` Jason Gunthorpe
[not found] ` <42CC9743-9112-4954-807D-2A7A856BC78E@pensando.io>
2020-03-12 17:26 ` Leon Romanovsky
2020-03-12 17:27 ` Jason Gunthorpe
2020-03-13 6:02 ` liweihang
2020-03-13 12:18 ` Jason Gunthorpe
2020-03-14 3:44 ` liweihang
2020-03-14 9:49 ` Leon Romanovsky [this message]
2020-03-14 18:07 ` Leon Romanovsky
2020-03-16 10:46 ` liweihang
2020-03-16 12:12 ` Jason Gunthorpe
2020-03-16 13:04 ` Leon Romanovsky
2020-03-16 13:29 ` liweihang
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=20200314094925.GE67638@unreal \
--to=leon@kernel.org \
--cc=aboyer@pensando.io \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liweihang@huawei.com \
/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).