[Ksummit-2013-discuss] [ATTEND] Use vprintk_emit() for userspace event communication

Hannes Reinecke hare at suse.de
Mon Jul 8 14:59:17 UTC 2013


Hi all,

I would like to attend the kernel summit 2013 in Edinburgh.

I'm currently working on revamping the SCSI error handling, bringing
it more in-line with modern hardware and SCSI specifications.
For that I've posted several patchsets to linux-scsi.

As part of the revamping I'm trying to get the SCSI sense code to
actually do something useful.
(SCSI sense codes are some sort of extended error description
devices are required to send upon various error scenarios).
The original idea of sending them out via uevents has the drawback
that uevents are not prioritised.
So any broken device might flood the system with sense codes,
causing udev to delay processing or even drop 'real' events,
so that the actual system state will be impacted.

Syslog, OTOH, is well used to be flooded with tons and tons of
messages so it does not suffer from this problem.
And with the latest printk updates vprintk_emit() has now two
different buffers, one for the logging message and another one for
structured data. So it would be possible to issue a vprintk_emit()
with no message, just the structured data.
Such a message would not show up in syslog, but would be available
for tools accessing the structured buffer directly.
This approach would have the benefit that we would not have to
invent yet another mechanism but could use existing, defined interfaces.

On the kernel summit I would like to discuss this approach to figure
out if this use-case of using vprintk_emit() with just a dictionary
meets with general approval or if there are alternative routes for
signalling events to userspace.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare at suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)


More information about the Ksummit-2013-discuss mailing list