From: Johannes Berg <johannes@sipsolutions.net>
To: "José Roberto de Souza" <jose.souza@intel.com>,
linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
Mukesh Ojha <quic_mojha@quicinc.com>,
Jonathan Cavitt <jonathan.cavitt@intel.com>
Subject: Re: [PATCH v2 2/4] devcoredump: Add dev_coredumpm_timeout()
Date: Wed, 28 Feb 2024 18:05:51 +0100 [thread overview]
Message-ID: <84e4f0d70c5552dd7fa350c61c28de9637628ee6.camel@sipsolutions.net> (raw)
In-Reply-To: <20240228165709.82089-2-jose.souza@intel.com>
> Current 5-minute timeout may be too short for users to search and
> understand what needs to be done to capture coredump to report bugs.
Conceptually, I'm not sure I understand this. Users should probably have
a script to capture coredumps to a file in the filesystem, possibly with
additional data such as 'dmesg' at the time of the dump.
Having this stick around longer in core kernel memory (not even
swappable) seems like a bad idea?
What kind of timeout were you thinking? Maybe you'd want 10 minutes? An
hour?
Also, then, why should the timeout be device-specific? If the user is
going to need time to find stuff, then surely that applies regardless of
the device?
So ... I guess I don't really like this, and don't really see how it
makes sense. Arguably, 5 minutes even is too long, not too short,
because you should have scripting that captures it, writes it to disk,
and all that can happen in the space of seconds, rather than minutes.
It's trivial to write such a script with a udev trigger or similar.
If we wanted to, we could even have a script that not only captures it
to disk, but also deletes it again from disk after a day or something,
so if you didn't care you don't get things accumulating. But I don't see
why the kernel should need to hang on to all the (possibly big) core
dump in RAM, for whatever time. And I also don't like the device-
dependency very much, TBH.
But if we do go there eventually:
> +void dev_coredumpm(struct device *dev, struct module *owner,
> + void *data, size_t datalen, gfp_t gfp,
> + ssize_t (*read)(char *buffer, loff_t offset, size_t count,
> + void *data, size_t datalen),
> + void (*free)(void *data))
> +{
> + dev_coredumpm_timeout(dev, owner, data, datalen, gfp, read, free,
> + DEVCD_TIMEOUT);
> +}
> EXPORT_SYMBOL_GPL(dev_coredumpm);
This could be a trivial static inline now, if you just put DEVCD_TIMEOUT
into the header file. Seems better than exporting another whole function
for it. Then you also don't need the no-op version of it.
johannes
next prev parent reply other threads:[~2024-02-28 17:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 16:57 [PATCH v2 1/4] devcoredump: Add dev_coredump_put() José Roberto de Souza
2024-02-28 16:57 ` [PATCH v2 2/4] devcoredump: Add dev_coredumpm_timeout() José Roberto de Souza
2024-02-28 17:05 ` Johannes Berg [this message]
2024-02-28 17:56 ` Souza, Jose
2024-03-01 8:38 ` Johannes Berg
2024-03-04 14:29 ` Souza, Jose
2024-03-04 23:55 ` Lucas De Marchi
2024-03-05 14:21 ` Souza, Jose
2024-03-05 15:22 ` Lucas De Marchi
2024-03-05 15:38 ` Souza, Jose
2024-03-08 14:53 ` Lucas De Marchi
2024-03-08 15:10 ` Rodrigo Vivi
2024-02-28 16:57 ` [PATCH v2 3/4] drm/xe: Remove devcoredump during driver release José Roberto de Souza
2024-02-28 16:57 ` [PATCH v2 4/4] drm/xe: Increase devcoredump timeout José Roberto de Souza
2024-02-28 17:02 ` [PATCH v2 1/4] devcoredump: Add dev_coredump_put() Cavitt, Jonathan
2024-02-28 17:04 ` ✓ CI.Patch_applied: success for series starting with [v2,1/4] " Patchwork
2024-02-28 17:04 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-28 17:05 ` ✓ CI.KUnit: success " Patchwork
2024-02-28 17:16 ` ✓ CI.Build: " Patchwork
2024-02-28 17:17 ` ✓ CI.Hooks: " Patchwork
2024-02-28 17:18 ` ✓ CI.checksparse: " Patchwork
2024-02-28 17:40 ` ✓ CI.BAT: " Patchwork
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=84e4f0d70c5552dd7fa350c61c28de9637628ee6.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=jose.souza@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_mojha@quicinc.com \
--cc=rodrigo.vivi@intel.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