From: Greg KH <gregkh@linuxfoundation.org>
To: "Czerwacki, Eial" <eial.czerwacki@sap.com>
Cc: "linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>,
SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
Subject: Re: [RFC] staging/vSMP: new driver
Date: Wed, 20 Apr 2022 14:17:36 +0200 [thread overview]
Message-ID: <Yl/54NGq70g1QuQq@kroah.com> (raw)
In-Reply-To: <PAXPR02MB7310F3F8129ECA908C3A0B4E81F59@PAXPR02MB7310.eurprd02.prod.outlook.com>
On Wed, Apr 20, 2022 at 11:57:51AM +0000, Czerwacki, Eial wrote:
> >From: Greg KH <gregkh@linuxfoundation.org>
> >Sent: Wednesday, April 20, 2022 14:42
> >To: Czerwacki, Eial <eial.czerwacki@sap.com>
> >Cc: linux-staging@lists.linux.dev <linux-staging@lists.linux.dev>; SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
> >Subject: Re: [RFC] staging/vSMP: new driver
> >
> >On Wed, Apr 20, 2022 at 11:38:57AM +0000, Czerwacki, Eial wrote:
> >> >From: Greg KH <gregkh@linuxfoundation.org>
> >> >Sent: Wednesday, April 20, 2022 14:24
> >> >To: Czerwacki, Eial <eial.czerwacki@sap.com>
> >> >Cc: linux-staging@lists.linux.dev <linux-staging@lists.linux.dev>; SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
> >> >Subject: Re: [RFC] staging/vSMP: new driver
> >> >
> >> >On Wed, Apr 20, 2022 at 11:18:15AM +0000, Czerwacki, Eial wrote:
> >> >> Greetings Greg,
> >> >>
> >> >> >From: Czerwacki, Eial <eial.czerwacki@sap.com>
> >> >> >Sent: Thursday, March 17, 2022 11:04
> >> >> >To: Greg KH <gregkh@linuxfoundation.org>
> >> >> >Cc: linux-staging@lists.linux.dev <linux-staging@lists.linux.dev>; SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
> >> >> >Subject: Re: [RFC] staging/vSMP: new driver
> >> >> >
> >> >> >>On Thu, Mar 17, 2022 at 08:52:37AM +0000, Czerwacki, Eial wrote:
> >> >> >>> >> >What tasks?
> >> >> >>> >> support of other information bits like stats
> >> >> >>> >
> >> >> >>> >I have no idea what that means :)
> >> >> >>> in short, the hypervisor can provide stats it collects, future implementation will export that too
> >> >> >>
> >> >> >>The trick will be _how_ you export this information. Let's wait on that
> >> >> >>one for now, your current api has lots of other questions to work out
> >> >> >>first :)
> >> >> >
> >> >> >sure, thanks for all the help.
> >> >> >
> >> >> >Eial
> >> >>
> >> >> I was wondering, after I've switched the driver flow to the pci driver one, I lost the ability to prevent vsmp.ko from loading in case no device was found.
> >> >> is there a way do to so?
> >> >
> >> >No, that is not how drivers have worked since the 2.4 kernel days (i.e.
> >> >20 years ago?) It is fine for your driver to be loaded even if there is
> >> >no device present.
> >> >
> >> >But, your driver will NOT be loaded automatically unless a device is
> >> >found, so why would it be present in that situation?
> >> >
> >> >thanks,
> >> >
> >> >greg k-h
> >>
> >> because there are other modules which depends on it.
> >
> >I do not understand the question.
> >
> >> I guess I can detect it as part of the other module's init
> >
> >Huh?
> >
> >Try it and see, the linker will properly pull in the needed modules if
> >you have symbols in one module that are needed by another one.
> nothing prevents a user from loading the modules even if the device is missing.
> the driver's hierarchy is one api modules and two unrelated modules which depend on it.
> running modprobe vsmp_logs on a system where the device doesn't exists results with a kernel trace.
What exact "kernel trace" is emitted?
> obliviously, this is not something accepted by the community.
I do not understand what is not acceptable?
> >
> >But if that is the case, why split them up into different modules?
> splitting the driver into three modules is purely for flexibility reasons.
Flexible for whom?
> e.g. on runtime a user can decide which parts of the driver to run
How? And why? A kernel driver should "just work" no need to configure
anything or only load, or not load, a specific set of drivers. That's
not how kernel modules work at all.
> >
> >I do not understand the question really. Try it and see first and if
> >you have specific problems, please post the code and we will be glad to
> >review it.
> maybe I just need to forgo the flexibility and add all features as a built-in which isn't configurable
What exact "flexibility" are you trying to do here?
And again, nothing should be configured, it should always "just work" if
the needed hardware is present. If not, nothing should happen.
Again, post your code for better answers, this is all just
hand-waving...
thanks,
greg k-h
next prev parent reply other threads:[~2022-04-20 12:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 18:13 [RFC] staging/vSMP: new driver Czerwacki, Eial
2022-03-16 18:31 ` Randy Dunlap
2022-03-16 18:57 ` Czerwacki, Eial
2022-03-17 7:23 ` Greg KH
2022-03-17 7:34 ` Czerwacki, Eial
2022-03-17 7:51 ` Greg KH
2022-03-17 8:17 ` Czerwacki, Eial
2022-03-17 8:35 ` Greg KH
2022-03-17 8:52 ` Czerwacki, Eial
2022-03-17 8:59 ` Greg KH
2022-03-17 9:04 ` Czerwacki, Eial
2022-04-20 11:18 ` Czerwacki, Eial
2022-04-20 11:24 ` Greg KH
2022-04-20 11:38 ` Czerwacki, Eial
2022-04-20 11:42 ` Greg KH
2022-04-20 11:57 ` Czerwacki, Eial
2022-04-20 12:17 ` Greg KH [this message]
2022-04-20 12:36 ` Czerwacki, Eial
2022-04-20 14:24 ` Greg KH
2022-03-17 7:24 ` Greg KH
2022-03-17 7:38 ` Czerwacki, Eial
2022-03-17 7:52 ` Greg KH
2022-03-17 10:19 ` Dan Carpenter
2022-03-17 10:27 ` Dan Carpenter
2022-03-17 13:41 ` Czerwacki, Eial
2022-03-17 13:56 ` Dan Carpenter
2022-03-17 14:05 ` Czerwacki, Eial
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=Yl/54NGq70g1QuQq@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=eial.czerwacki@sap.com \
--cc=linux-staging@lists.linux.dev \
--cc=linux.vsmp@sap.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