Re: Random scheduler/unaligned accesses crashes with perf lock events on sparc 64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Tuesday, April 6, 2010 - 6:41 am

David,

It's best to send to my rostedt@goodmis.org account, just like it is
best to send to your davem@davemloft.net ;-)


On Mon, 2010-04-05 at 19:15 -0700, David Miller wrote:

OK, so the a 64 bit word still needs 64 bit alignment when storing to a
data pointer.

I wonder if we should just have a special copy in this case for the
events and remove this patch in the ring buffer. That is:

	__assign_word(__entry->word, value);

And have in !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS be:

	#define __assgin_word(dest, src)	\
		memcpy(&(dest), &(src), sizeof(src));

This would fix it for all.


The RINGBUF_TYPE_PADDING is used to either fill the rest of the sub
buffer, where alignment does not matter, or to replace a deleted event
that had another event after, it, which should already be aligned.


What about removing the logic from the ring buffer and moving it to the
TRACE_EVENT() macros as I suggested above?

We would probably need a way to read the buffers too.

I also know that Mathieu has some strange tricks to force alignment but
I'm still not convinced it would make things any less fragile than what
is already there.

-- Steve


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Random scheduler/unaligned accesses crashes with perf lock ..., Frederic Weisbecker, (Sun Apr 4, 5:18 am)
Re: Random scheduler/unaligned accesses crashes with perf ..., Frederic Weisbecker, (Sun Apr 4, 5:21 am)
Re: Random scheduler/unaligned accesses crashes with perf ..., Frederic Weisbecker, (Sun Apr 4, 11:57 pm)
Re: Random scheduler/unaligned accesses crashes with perf ..., Frederic Weisbecker, (Mon Apr 5, 12:40 pm)
Re: Random scheduler/unaligned accesses crashes with perf ..., Frederic Weisbecker, (Tue Apr 6, 3:19 am)
Re: Random scheduler/unaligned accesses crashes with perf ..., Frederic Weisbecker, (Tue Apr 6, 4:38 am)
Re: Random scheduler/unaligned accesses crashes with perf ..., Steven Rostedt, (Tue Apr 6, 6:41 am)
[No subject], David Miller, (Tue Apr 6, 10:46 am)
Re: Random scheduler/unaligned accesses crashes with perf ..., Paul E. McKenney, (Tue Apr 6, 11:04 am)