[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49b7c2350905262230q47322e1bx607423cc3a9fb32b@mail.gmail.com>
Date: Wed, 27 May 2009 14:30:51 +0900
From: GeunSik Lim <leemgs1@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Greg KH <greg@...ah.com>,
linux-kernel <linux-kernel@...r.kernel.org>, trivial@...nel.org,
balagi@...tmail.de, bgamari@...il.com, Ingo Molnar <mingo@...e.hu>,
inaky.perez-gonzalez@...el.com
Subject: Re: [RFC PATCH]debugfs:Fix terminology inconsistency of dir name to
mount debugfs filesystem.
On Wed, May 27, 2009 at 11:38 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
>
>
> On Wed, 27 May 2009, GeunSik Lim wrote:
>
>> On Wed, May 27, 2009 at 6:15 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
>> >
>> > On Tue, 26 May 2009, Greg KH wrote:
>> >> >
>> >> > The filesystem Nazi's out there will argue that the proper place to mount
>> >> > the debugfs filesystem is /sys/kernel/debug. I personally find that
>> >> > location annoying.
>> >>
>> >> Why?
>> >
>> > Because it is too much to type ;-)
>> I think so. But, when we consider many developers that use linux kernel
>> source all over the world, I think that a regular rules or consistency
>> is important
>> as greg k-h explained.
>>
>> Recently, I read "ftrace-world.odp" presentation file of steven rostedt.
>>
>> For example, about Mounting debugfs...
>> #> mount -t debugfs nodev /sys/kernel/debug
>> OR
>> #> mkdir /debug
>> #> mount -t debugfs nodev /debug
>>
>> I want that we will reach a consensus about mount directory name of
>> debugfs filesystem to avoid confusing among the kernel developers.
>>
>> /debug/ ?
>> or /sys/kernel/debug/?
>> .....
>>
>> Frankly speaking, I like /sys/kernel/debug/ rule is better than /debug/ rule
>> for consistency.
>
> And this is why I always mention that directory.
>
>>
>> >
>> >>
>> >> When I created debugfs, I was told that I had to pick a place to mount
>> >> it so that everyone could write scripts that "knew" where it would be.
>> >>
>> >> So we picked /sys/kernel/debug/ and the code creates the mount point to
>> >> put it there. Now distros actually mount debugfs at that location.
>> >>
>> >> So, now you don't like this? After it's become a standard? Ick.
>> >>
>> >> Becides, /debug/ is pretty presumptious, it's as if debugging the kernel
>> >> is a system-wide thing :)
>> >>
>> >> So please, don't use /debug/ use the standard, defined, and ACTUALLY
>> >> USED BY DISTROS TODAY mount point of /sys/kernel/debug/
>> >>
>> >> If you want to create your own symlink from /debug/ to that location to
>> >> make it easier to type, feel free, but do not hard code any scripts to
>> >> use that location, or they are going to break.
>> >
>> > All my scripts search /proc/mounts to find where debugfs is mounted, then
>> > it uses that.
>> >
>> > Hmm, Not sure what packages in the distros use the default. I don't see
>> > the debugfs in /etc/fstab in any of my machines.
>> >
>> Yes.. In my case, I use linux distributions like Ubuntu 8.10, Fedora
>> 9/10, CENTOS 5.3 currently. This distributions use proc , tmpfs,
>> devpts, sysfs for official release
>> by default.
>>
>
> The key thing is not to have scripts depend on a path. When debugfs is
> enabled in a kernel, you automatically get /sys/kernel/debug, so that is a
> natural place to mount it.
>
> I have also suggested to people (as Greg suggested earlier to me) that you
> can mount it there and then make a soft link to it. Which also works.
>
> I personally just mount it at /debug.
>
> To handle the scripts problem, all my scripts start with:
>
> # grep debugfs /proc/mounts | cut -d ' ' -f 2
>
> I also have a C function to do a search for debugfs in /proc/mounts.
>
> If you look in Documentation/trace/ftrace.txt I have:
>
> ===
> To mount the debugfs system:
>
> # mkdir /debug
> # mount -t debugfs nodev /debug
>
> ( Note: it is more common to mount at /sys/kernel/debug, but for
> simplicity this document will use /debug)
> ===
>
> Thus it is a personal preference of mine to put it at /debug. But I do not
> hide the fact that it is recommended to be in /sys/kernel/debug. Heck, I'm
> the one that brought to light that path in this thread. I just curse it
> everytime I have to say it ;-)
Thank you for explanation about history of "/debug/" and "/sys/kernel/debug/"
in the ./Documentations/trace/ftrace.txt file.
Do I have to change contents of patch file from "/debug/***" to "debug/***"
to consider both "/debug/"directory and
"/sys/kernel/debug/ (initial directory by debugfs)" directory in the
my patch file?
Or,
Do I have to keep "/" character of "/debug" in my patch file that I proposed
because many contributors already use "/debugfs/" or "/debug/"
in their patch files?
Steven, Can you advise me?
>
> -- Steve
>
--
Regards,
GeunSik Lim ( SAMSUNG ELECTRONICS)
Blog : http://blog.naver.com/invain/
e-Mail: geunsik.lim@...sung.com
leemgs@...il.com , leemgs1@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists