All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Ben Greear <greearb@candelatech.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Arend van Spriel <aspriel@gmail.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: How to let devcoredump know data has been read?
Date: Tue, 5 Jun 2018 15:53:25 -0700	[thread overview]
Message-ID: <20180605225324.GA195207@rodete-desktop-imager.corp.google.com> (raw)
In-Reply-To: <6f54d11c-74a5-568a-ba1e-3f37edb28384@candelatech.com>

Hi,

On Tue, Jun 05, 2018 at 03:27:28PM -0700, Ben Greear wrote:
> I have been testing ath10k on 4.16, which uses the devcoredump API
> to notify about dumps.
> 
> I am able to see the binary crash dump at /sys/class/devcoredump/devcd2/data,
> for instance, but if I do another crash quickly, I get no new uevent sent
> and no new crash.
> 
> I see there is a 5 minute timer on the coredump data, but it also seems to indicate
> that if I read the crash, the data should be cleared and ready to be
> recreated again?  How do you notify the system that the crash data has
> been read?
> 
> I tried 'cat' on the data file, but that did not seem to clear anything.

Try *writing* to it?

https://elixir.bootlin.com/linux/v4.16/source/drivers/base/devcoredump.c#L91

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=833c95456a70826d1384883b73fd23aff24d366f

<quote>
The dumped data will be readable in sysfs in the virtual device's
data file under /sys/class/devcoredump/devcd*/. Writing to it will
free the data and remove the device, as does a 5-minute timeout.
</quote>

e.g.:

# ls -l /sys/class/devcoredump/devcd1
lrwxrwxrwx. 1 root root 0 Jun  5 15:49 /sys/class/devcoredump/devcd1 -> ../../devices/virtual/devcoredump/devcd1
# echo 1 > /sys/class/devcoredump/devcd1/data
# ls -l /sys/class/devcoredump/devcd1
ls: cannot access '/sys/class/devcoredump/devcd1': No such file or directory

Unfortunately, devcoredump is a bit lacking in documentation. Arend was
writing a bit for the new trigger mechanism at least.

Brian

  reply	other threads:[~2018-06-05 22:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 22:27 How to let devcoredump know data has been read? Ben Greear
2018-06-05 22:53 ` Brian Norris [this message]
2018-06-06 17:04   ` Ben Greear
2018-06-06 19:02     ` Arend van Spriel
2018-06-06 19:08   ` Arend van Spriel

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=20180605225324.GA195207@rodete-desktop-imager.corp.google.com \
    --to=briannorris@chromium.org \
    --cc=aspriel@gmail.com \
    --cc=greearb@candelatech.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.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 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.