Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-19 Thread David Ahern
On 11/12/13, 8:34 AM, Peter Zijlstra wrote: On Tue, Nov 12, 2013 at 08:25:02AM -0700, David Ahern wrote: The patch in this thread deletes the file. Another option is to rewind the file to the last known good write (ie., length after last successful call to write_output). I'd report a warning a

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 08:25:02AM -0700, David Ahern wrote: > On 11/12/13, 8:04 AM, Peter Zijlstra wrote: > >On Tue, Nov 12, 2013 at 07:51:16AM -0700, David Ahern wrote: > >>> From man mmap: > >>>SIGBUS Attempted access to a portion of the buffer that > >>>does not correspond to

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-12 Thread David Ahern
On 11/12/13, 8:04 AM, Peter Zijlstra wrote: On Tue, Nov 12, 2013 at 07:51:16AM -0700, David Ahern wrote: From man mmap: SIGBUS Attempted access to a portion of the buffer that does not correspond to the file (for example, beyond the end of the file, ... SIGBUS is b

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 07:51:16AM -0700, David Ahern wrote: > > From man mmap: > >SIGBUS Attempted access to a portion of the buffer that > >does not correspond to the file (for example, beyond > >the end of the file, ... SIGBUS is basically the std fail for any fault;

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-12 Thread David Ahern
Ingo: On 11/11/13, 7:43 AM, David Ahern wrote: On 11/11/13, 2:37 AM, Ingo Molnar wrote: * David Ahern wrote: If perf fails to write data to the data file (e.g., ENOSPC error) it fails with the message: failed to write perf data, error: No space left on device and stops — killing the wor

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-11 Thread David Ahern
On 11/11/13, 2:37 AM, Ingo Molnar wrote: * David Ahern wrote: If perf fails to write data to the data file (e.g., ENOSPC error) it fails with the message: failed to write perf data, error: No space left on device and stops — killing the workload too. The file is an unknown state. Trying t

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-11 Thread Ingo Molnar
* David Ahern wrote: > If perf fails to write data to the data file (e.g., ENOSPC error) it fails > with the message: > failed to write perf data, error: No space left on device > > and stops — killing the workload too. The file is an unknown state. > Trying to read it (e.g., perf report) fa

Re: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

2013-11-08 Thread Jiri Olsa
On Fri, Nov 08, 2013 at 09:41:46AM -0700, David Ahern wrote: > If perf fails to write data to the data file (e.g., ENOSPC error) it fails > with the message: > failed to write perf data, error: No space left on device > > and stops — killing the workload too. The file is an unknown state. Trying