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 20:07:24 +0200 [thread overview]
Message-ID: <20200314180724.GH67638@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?
I don't know why my previous answer didn't appear in the ML, hope that
this will arrive.
The technical reasons to avoid environmental variables and kernel module
parameters are not the same, but very similar.
Environmental variables are not thread safe (in POSIX), inherited with
fork() and behaves differently in scripts. All this together makes them
as very bad user visible configuration interface.
Kernel module parameters are not welcomed due to their global nature,
difference between various drivers which makes hard for users to change
HW/scripts, almost impossible to deprecate e.t.c.
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
2020-03-14 18:07 ` Leon Romanovsky [this message]
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=20200314180724.GH67638@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