[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f146730-1bf9-db75-911d-67809fc7afef@deltatee.com>
Date: Tue, 4 Dec 2018 13:30:01 -0700
From: Logan Gunthorpe <logang@...tatee.com>
To: Jerome Glisse <jglisse@...hat.com>
Cc: Dan Williams <dan.j.williams@...el.com>,
Andi Kleen <ak@...ux.intel.com>, Linux MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Haggai Eran <haggaie@...lanox.com>, balbirs@....ibm.com,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"Kuehling, Felix" <felix.kuehling@....com>, Philip.Yang@....com,
"Koenig, Christian" <christian.koenig@....com>,
"Blinzer, Paul" <Paul.Blinzer@....com>,
John Hubbard <jhubbard@...dia.com>, rcampbell@...dia.com
Subject: Re: [RFC PATCH 02/14] mm/hms: heterogenenous memory system (HMS)
documentation
On 2018-12-04 1:13 p.m., Jerome Glisse wrote:
> You are right many are non exclusive. It is just my feeling that having
> a mask as a file inside the target directory might be overlook by the
> application which might start using things it should not. At same time
> i guess if i write the userspace library that abstract this kernel API
> then i can enforce application to properly select thing.
I think this is just evidence that this is not a good API. If the user
has the option to just ignore things or do it wrong that's a problem
with the API. Using a prefix for the name doesn't change that fact.
> I do not think there is a way to answer that question. I am siding on the
> side of this API can be dumb down in userspace by a common library. So let
> expose the topology and let userspace dumb it down.
I fundamentally disagree with this approach to designing APIs. Saying
"we'll give you the kitchen sink, add another layer to deal with the
complexity" is actually just eschewing API design and makes it harder
for kernel folks to know what userspace actually requires because they
are multiple layers away.
> If we dumb it down in the kernel i see few pitfalls:
> - kernel dumbing it down badly
> - kernel dumbing down code can grow out of control with gotcha
> for platform
This is just a matter of designing the APIs well. Don't do it badly.
> - it is still harder to fix kernel than userspace in commercial
> user space (the whole RHEL business of slow moving and long
> supported kernel). So on those being able to fix thing in
> userspace sounds pretty enticing
I hear this argument a lot and it's not compelling to me. I don't think
we should make decisions in upstream code to allow RHEL to bypass the
kernel simply because it would be easier for them to distribute code
changes.
Logan
Powered by blists - more mailing lists