Summary: | page fault in tcp_do_segment (r287759 suspected) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Andriy Gapon <avg> | ||||
Component: | kern | Assignee: | George V. Neville-Neil <gnn> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | gnn, hiren, jch | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Andriy Gapon
2015-09-28 11:19:01 UTC
Created attachment 161483 [details]
fix / work-around
The attached trivial patch seems to make the issue go away.
But I am not sure if that's a correct fix as not firing the probe at all could result in an incomplete event trail.
As a side note, in my opinion the use of mtod() with the SDT probes in tcp_do_segment() is slightly against the recommended SDT usage. Typically an SDT probe's arguments are values that are actually used near the probe and thus have a high chance of being in CPU registers or in the L1 cache. In tcp_do_segment() there does not seem to be any access to m_data, so the probes have a bigger overhead because of the extra memory access. m_data's value might still be in the L1 cache, though.
(In reply to Andriy Gapon from comment #1) Assigning this bug to George. Andriy: Your patch is any day better than hitting page faults. :-) I'd say go ahead and commit this patch if George/others don't have any immediate better fix. You raise a good/valid point about the efficiency. I hope we could prove/disprove the theory somehow. ping Is this still an issue that needs fixing? I believe so. Ping. Still an issue? if so, we should fix it with proposed patch or ask someone more familiar with dtrace to come-up with a better way. Actually the safest answer is a bit more complex, we can always pass 0 to TCP_PROBE3 in the right place I'll implement a more complete solution and put up a review.. A commit references this bug: Author: gnn Date: Wed Jan 4 02:19:13 UTC 2017 New revision: 311225 URL: https://svnweb.freebsd.org/changeset/base/311225 Log: Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and dangerous. Those wanting data from an mbuf should use DTrace itself to get the data. PR: 203409 Reviewed by: hiren MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D9035 Changes: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. |