Skip to content

n_tty cleanup + trace additions

Peter Hurley linux-serial lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyIn review
  2. v17 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Patches 1-6 are unchanged from v1.
- Patch 7 changes: make n_tty_trace() configurable to output via pr_xxxx() or dev_dbg() rather than trace_printk() per Alan's comments
- Patch 8 adds echo buffer indices tracing (separately selectable)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8n_tty: Merge .receive_buf() flavorsdrivers/tty/n_tty.c+16 -270 replies
2/8n_tty: Un-inline slow-path n_tty_receive_char()drivers/tty/n_tty.c+1 -10 replies
3/8n_tty: Un-inline slow-path n_tty_receive_char_closing()drivers/tty/n_tty.c+1 -20 replies
4/8n_tty: Refactor PARMRK doubling checksdrivers/tty/n_tty.c+5 -90 replies
5/8n_tty: Refactor input_available_p() by call sitedrivers/tty/n_tty.c+4 -30 replies
6/8n_tty: Only perform wakeups for waitersdrivers/tty/n_tty.c+12 -60 replies
7/8n_tty: Extend debug tracingdrivers/tty/n_tty.c+63 -161 reply
8/8n_tty: Trace echo output with separate trace configurationdrivers/tty/n_tty.c+14 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 tty-next 0/8] n_tty cleanup + trace additions

Greg,

This patchset is a v2 respin which contains no bug fixes, only misc cleanup for the N_TTY line discipline and significant additions to debug tracing.

As I mentioned in a previous email, I can hold on to patches 7 and 8 and keep them out-of-tree if you'd rather not have instrumented code in the tty layer.

v2:
- Patches 1-6 are unchanged from v1.
- Patch 7 changes: make n_tty_trace() configurable to output via pr_xxxx() or dev_dbg() rather than trace_printk() per Alan's comments
- Patch 8 adds echo buffer indices tracing (separately selectable)

v1:
Patches 1-4 cleans up code duplication remnants from 3.12's changes. Patch 5 simplifies the snarled logic of how much data is considered 'input available'. I was getting tired of hand checking that logic every time I touched minimum_to_wake.
Patch 6 reduces unnecessary wake ups.

Patch 7 extends the trace usage to aid in identifying and fixing input flow-control bugs (this was used to fix the readline() bug). I also expect to use it to reduce input processing restarts. It's use is disabled by default and only enabled with the file-local define N_TTY_TRACE (similar to TTY_DEBUG_HANGUP in tty_io.c).

Regards,

Peter Hurley (8):
n_tty: Merge .receive_buf() flavors
n_tty: Un-inline slow-path n_tty_receive_char()
n_tty: Un-inline slow-path n_tty_receive_char_closing()
n_tty: Refactor PARMRK doubling checks
n_tty: Refactor input_available_p() by call site
n_tty: Only perform wakeups for waiters
n_tty: Extend debug tracing
n_tty: Trace echo output with separate trace configuration

 drivers/tty/n_tty.c | 174 +++++++++++++++++++++++++++++++++-------------------
 1 file changed, 112 insertions(+), 62 deletions(-)
Signature · 1 line
1.8.1.2