Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1687118
| From | Felipe Balbi <felipe.balbi@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: gadget: functions: add ftrace export over USB |
| Date | 2017-07-14 09:00 +0200 |
| Message-ID | <u32JY-88H-17@gated-at.bofh.it> (permalink) |
| References | <tQlr3-6oe-3@gated-at.bofh.it> <u31ux-7nE-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi,
Pratyush Anand <panand@redhat.com> writes:
> Hi Felipe,
>
> On Friday 09 June 2017 11:43 AM, Felipe Balbi wrote:
>> +static void notrace ftrace_write(struct trace_export *ftrace, const void *buf,
>> + unsigned int len)
>> +{
>> + struct usb_ftrace *trace = ftrace_to_trace(ftrace);
>> + struct usb_request *req = next_request(&trace->list);
>> +
>> + if (!req)
>> + return;
>> +
>> + if (!trace->in->enabled)
>> + return;
>> +
>> + req->buf = kmemdup(buf, len, GFP_ATOMIC);
>
> Probably we can avoid the copy of trace data.
not with current setup. I have no control over data's lifetime. If I
did, then this would be zero-copy.
> We can make write() call of "struct trace_export" as posted. Can have a
that would require further patching in trace core which is not part of
$subject. Also, if we turn this into asynchronous calls, we could run
out of trace buffer before the first chunk of data is transferred over
to the other side.
> write_complete() callback function implemented in struct trace_export,which
> can be called from your ftrace_complete().
well, you're welcome to propose a patch :-)
--
balbi
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] usb: gadget: functions: add ftrace export over USB Pratyush Anand <panand@redhat.com> - 2017-07-14 07:40 +0200 Re: [PATCH] usb: gadget: functions: add ftrace export over USB Felipe Balbi <felipe.balbi@linux.intel.com> - 2017-07-14 09:00 +0200
csiph-web