From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Cc: "slava@dubeyko.com" <slava@dubeyko.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [RFC PATCH v1 1/4] ml-lib: Introduce Machine Learning (ML) library declarations
Date: Tue, 10 Feb 2026 06:20:34 +0100 [thread overview]
Message-ID: <2026021005-tacky-pentagon-aab1@gregkh> (raw)
In-Reply-To: <46449ed46d60767bd13b980e5ab63faf4364f718.camel@ibm.com>
On Mon, Feb 09, 2026 at 08:48:17PM +0000, Viacheslav Dubeyko wrote:
> On Sat, 2026-02-07 at 16:52 +0100, Greg KH wrote:
> > On Fri, Feb 06, 2026 at 11:11:33AM -0800, Viacheslav Dubeyko wrote:
> > > + * @kobj: /sys/<subsystem>/<ml_model>/ ML model object
> > > + * @kobj_unregister: completion state for <ml_model> kernel object
> > > + */
> > > +struct ml_lib_model {
> > > + atomic_t mode;
> > > + atomic_t state;
> > > + const char *subsystem_name;
> > > + const char *model_name;
> > > +
> > > + struct ml_lib_subsystem *parent;
> > > +
> > > + spinlock_t parent_state_lock;
> > > + struct ml_lib_subsystem_state * __rcu parent_state;
> > > +
> > > + spinlock_t options_lock;
> > > + struct ml_lib_model_options * __rcu options;
> > > +
> > > + spinlock_t dataset_lock;
> > > + struct ml_lib_dataset * __rcu dataset;
> > > +
> > > + struct ml_lib_model_operations *model_ops;
> > > + struct ml_lib_subsystem_state_operations *system_state_ops;
> > > + struct ml_lib_dataset_operations *dataset_ops;
> > > + struct ml_lib_request_config_operations *request_config_ops;
> > > +
> > > + /* /sys/<subsystem>/<ml_model>/ */
> > > + struct kobject kobj;
> > > + struct completion kobj_unregister;
> > > +};
> >
> > Do NOT abuse sysfs for something like this. Please make your own
> > filesystem or char device or something else, but this is not what sysfs
> > is for at all, sorry.
> >
>
> Currently, sysfs entry is used for sending commands (start, stop,
> prepare_dataset, discard_dataset) from user-space on the kernel-space side. And
> the intention of using sysfs entries is the export information about kernel
> subsystem and exchanging by commands and notifications between user-space and
> kernel-space sides. Do you mean that it is wrong using of sysfs? Have I
> misunderstood your point?
Yes, this is NOT the correct use of sysfs, do NOT use it for an api like
this at all. Use the correct ones instead.
thanks,
greg k-h
next prev parent reply other threads:[~2026-02-10 5:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 19:11 [RFC PATCH v1 0/4] Machine Learning (ML) library in Linux kernel Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 1/4] ml-lib: Introduce Machine Learning (ML) library declarations Viacheslav Dubeyko
2026-02-07 15:52 ` Greg KH
2026-02-09 20:48 ` Viacheslav Dubeyko
2026-02-10 5:20 ` gregkh [this message]
2026-02-10 22:44 ` Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 2/4] ml-lib: Implement PoC of Machine Learning (ML) library functionality Viacheslav Dubeyko
2026-02-06 19:11 ` [RFC PATCH v1 3/4] ml-lib: Implement simple testing character device driver Viacheslav Dubeyko
2026-02-07 15:55 ` Greg KH
2026-02-09 20:56 ` Viacheslav Dubeyko
2026-02-10 5:21 ` greg
2026-02-06 19:11 ` [RFC PATCH v1 4/4] ml-lib: Implement simple user-space testing application Viacheslav Dubeyko
2026-02-06 22:59 ` [RFC PATCH v1 0/4] Machine Learning (ML) library in Linux kernel Jonathan Corbet
2026-02-09 20:33 ` Viacheslav Dubeyko
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=2026021005-tacky-pentagon-aab1@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Slava.Dubeyko@ibm.com \
--cc=bpf@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=slava@dubeyko.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