linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergiu Iordache <sergiu@chromium.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>,
	"Ahmed S. Darwish" <darwish.07@gmail.com>,
	Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] char drivers: ramoops debugfs entry
Date: Thu, 7 Jul 2011 13:01:30 -0700	[thread overview]
Message-ID: <20110707130130.8dd02f01.akpm@linux-foundation.org> (raw)
In-Reply-To: <1309994990-4729-4-git-send-email-sergiu@chromium.org>

On Wed,  6 Jul 2011 16:29:50 -0700
Sergiu Iordache <sergiu@chromium.org> wrote:

> While ramoops writes to ram, accessing the dump requires using /dev/mem
> and knowing the memory location (or a similar solution). This patch
> provides a debugfs interface through which the respective memory
> area can be easily accessed.
> 
> The entry added is /sys/kernel/debug/ramoops/next
> 
> The entry returns a dump of size record_size each time, skipping invalid
> dumps. When it reaches the end of the memory area reserved for dumps it
> returns an empty record and resets the current record count.

The patch increases the size of ramoops.o text&data from 1725 bytes to
2282 even when CONFIG_DEBUG_FS=n.  That's quite a lot of bloat!

Furthermore, I think debugfs is the wrong place to put this.  debugfs
is, umm, for debugging.  It's a place in which to put transitory junk
which may or may not be there and where interfaces may change without
notice and whose presence userspace should not assume.  But in this
patch you're proposing a permanent and formal new interface into the
ramoops driver.  It should go into a permanent well-known place where
it will be maintained with the formality and care of all the other
parts of the kernel API.

Also, you're proposing a new kernel/userspace API but it wasn't
documented anywhere.  We don't want to have to reverse-engineer your
proposed API from the implementation for review purposes.  That API
should have been exhaustively documented in the changelog so others can
decide whether they like it.

Finally, we should provide user documentation for the new interface so
others can find out that it exists and can use it correctly.  We seem
not to have bothered documenting ramoops so we don't currently have a
context in which to do this.

  reply	other threads:[~2011-07-07 20:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 23:29 [PATCH v3 0/3] char drivers: rammops improvements Sergiu Iordache
2011-07-06 23:29 ` [PATCH v3 1/3] char drivers: ramoops dump_oops platform data Sergiu Iordache
2011-07-06 23:29 ` [PATCH v3 2/3] char drivers: ramoops record_size module parameter Sergiu Iordache
2011-07-06 23:29 ` [PATCH v3 3/3] char drivers: ramoops debugfs entry Sergiu Iordache
2011-07-07 20:01   ` Andrew Morton [this message]
2011-07-07 22:34     ` Sergiu Iordache
2011-07-07 22:54       ` Andrew Morton
2011-07-07 23:16         ` Sergiu Iordache
2011-07-07 23:27           ` Andrew Morton
2011-07-07 23:33             ` Greg KH
2011-07-08  6:43               ` Marco Stornelli
2011-07-11 16:54                 ` Sergiu Iordache
2011-07-12  6:41                   ` Marco Stornelli
2011-07-29  0:15                     ` Sergiu Iordache
2011-07-29  8:21                       ` Marco Stornelli
2011-07-07 17:32 ` [PATCH v3 0/3] char drivers: rammops improvements Marco Stornelli

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=20110707130130.8dd02f01.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=darwish.07@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=sergiu@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).