* [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions.
@ 2015-05-03 3:10 green
2015-05-03 18:15 ` Greg Kroah-Hartman
2015-05-03 19:43 ` Oleg Drokin
0 siblings, 2 replies; 3+ messages in thread
From: green @ 2015-05-03 3:10 UTC (permalink / raw)
To: kernel-janitors
From: Oleg Drokin <green@linuxhacker.ru>
Greg, I wonder if you can take at least a brief look and tell me if this
is the direction you were envisioning wrt this particular cleanup.
It's not all-inclusive, but I have a long flight tomorrow so
if the direction is right, I can convert more of this stuff.
This does not touch some of the multi-value stuff that would probably
need to move to debugfs or other places, that would be a next step.
Additionally some questions:
I know sysfs is supposedly 1 file 1 value, though I see some exceptions, e.g.:
# cat /sys/kernel/vmcoreinfo
2b57500 1024
So we have this /proc/fs/lustre/devices that prints status of all
"lustre internal devices (or obd for short)" like this:
# cat /proc/fs/lustre/devices
0 UP mgc MGC192.168.10.226@tcp d6815182-b36d-c4ba-6aa6-065aeb9e9769 5
1 UP lov lustre-clilov-ffff8800bd617800 32be3f55-891e-ed82-cae9-6add0770d503 4
...
Obviously I cannot retain it as a single file, but do I really need to
create a tree that would look like:
/sys/fs/lustre/obd/[1...]/{status,name,type,uuid,refcount}
(or possibly even /sys/devices/virtual/lustre_obd/... )
or can I get away with just
/sys/fs/lustre/obd/[1...] files where there's one line per obd like:
0 UP mgc MGC192.168.10.226@tcp d6815182-b36d-c4ba-6aa6-065aeb9e9769 5
(frankly, I have not figured out yet how to dynamically add files
to sysfs dir).
What about /proc/sys stuff - /proc/sys/lustre and /proc/sys/lnet?
Hopefully it's ok to leave those where they are?
Also I found that cgroup does calls into kernfs directly, gaining
ability to register seq_file files and otherwise do all sorts of
stuff that would be cool to do from lustre too ;)
These patches compile and run, but I imagine it's not a great idea
to merge them yet.
Thanks.
Oleg Drokin (3):
staging/lustre: Generic helpers for sysfs
staging/lustre: Move /proc/fs/lustre root level files to sysfs
staging/lustre/llite: move some procfs files to sysfs
.../staging/lustre/lustre/include/lprocfs_status.h | 26 +++
.../staging/lustre/lustre/llite/llite_internal.h | 4 +
drivers/staging/lustre/lustre/llite/llite_lib.c | 7 +-
drivers/staging/lustre/lustre/llite/lproc_llite.c | 190 ++++++++++++---------
drivers/staging/lustre/lustre/llite/super25.c | 11 +-
.../lustre/lustre/obdclass/linux/linux-module.c | 116 ++++++++-----
.../lustre/lustre/obdclass/lprocfs_status.c | 24 +++
7 files changed, 246 insertions(+), 132 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions.
2015-05-03 3:10 [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions green
@ 2015-05-03 18:15 ` Greg Kroah-Hartman
2015-05-03 19:43 ` Oleg Drokin
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-03 18:15 UTC (permalink / raw)
To: kernel-janitors
On Sat, May 02, 2015 at 11:10:05PM -0400, green@linuxhacker.ru wrote:
> From: Oleg Drokin <green@linuxhacker.ru>
>
> Greg, I wonder if you can take at least a brief look and tell me if this
> is the direction you were envisioning wrt this particular cleanup.
>
> It's not all-inclusive, but I have a long flight tomorrow so
> if the direction is right, I can convert more of this stuff.
>
> This does not touch some of the multi-value stuff that would probably
> need to move to debugfs or other places, that would be a next step.
>
> Additionally some questions:
> I know sysfs is supposedly 1 file 1 value, though I see some exceptions, e.g.:
> # cat /sys/kernel/vmcoreinfo
> 2b57500 1024
>
> So we have this /proc/fs/lustre/devices that prints status of all
> "lustre internal devices (or obd for short)" like this:
> # cat /proc/fs/lustre/devices
> 0 UP mgc MGC192.168.10.226@tcp d6815182-b36d-c4ba-6aa6-065aeb9e9769 5
> 1 UP lov lustre-clilov-ffff8800bd617800 32be3f55-891e-ed82-cae9-6add0770d503 4
> ...
>
> Obviously I cannot retain it as a single file, but do I really need to
> create a tree that would look like:
> /sys/fs/lustre/obd/[1...]/{status,name,type,uuid,refcount}
> (or possibly even /sys/devices/virtual/lustre_obd/... )
> or can I get away with just
> /sys/fs/lustre/obd/[1...] files where there's one line per obd like:
> 0 UP mgc MGC192.168.10.226@tcp d6815182-b36d-c4ba-6aa6-065aeb9e9769 5
> (frankly, I have not figured out yet how to dynamically add files
> to sysfs dir).
Either make a tree of kobjects, or individual files, but not one big
file, that's not acceptable for sysfs, sorry.
> What about /proc/sys stuff - /proc/sys/lustre and /proc/sys/lnet?
> Hopefully it's ok to leave those where they are?
Nope, please remove. If you aren't a process value, you can't add new
proc files.
> Also I found that cgroup does calls into kernfs directly, gaining
> ability to register seq_file files and otherwise do all sorts of
> stuff that would be cool to do from lustre too ;)
If you want to make lustrefs, be my guest, you can do whatever you want
in that, using kernfs, but that's not ok for sysfs, sorry.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions.
2015-05-03 3:10 [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions green
2015-05-03 18:15 ` Greg Kroah-Hartman
@ 2015-05-03 19:43 ` Oleg Drokin
1 sibling, 0 replies; 3+ messages in thread
From: Oleg Drokin @ 2015-05-03 19:43 UTC (permalink / raw)
To: kernel-janitors
On May 3, 2015, at 2:15 PM, Greg Kroah-Hartman wrote:
>> Also I found that cgroup does calls into kernfs directly, gaining
>> ability to register seq_file files and otherwise do all sorts of
>> stuff that would be cool to do from lustre too ;)
> If you want to make lustrefs, be my guest, you can do whatever you want
> in that, using kernfs, but that's not ok for sysfs, sorry.
If only __kernfs_create_file was exported… ;)
Otherwise you cannot really do that from modules.
Bye,
Oleg--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-03 19:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-03 3:10 [RFC PATCH 0/3] Moving lustre procfs stuff to sysfs & questions green
2015-05-03 18:15 ` Greg Kroah-Hartman
2015-05-03 19:43 ` Oleg Drokin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.