linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] printk: start simplifying some flags
@ 2014-07-18 14:14 Alex Elder
  2014-07-18 14:14 ` [PATCH v3 1/7] printk: report dropped messages on separate line Alex Elder
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Alex Elder @ 2014-07-18 14:14 UTC (permalink / raw)
  To: akpm; +Cc: kay, pmladek, bp, john.stultz, jack, linux-kernel

Each log record has a "flags" field.  The flags keep track of, for
instance, whether the record was saved in its entirety (as opposed
to being one of multiple records that should be merged as a single
unit).  A log record's flags field alone is not currently sufficient
to know how the record should be formatted; you need to know the
previous record's flags field as well.  I found understanding the
real effect of various combinations of these flags to be very
difficult, and was moved to try to do something about that.

This series includes three patches that begin the process of
simplifying how these flags are used and interpreted.  They include
very long, detailed explanations (as small patches often do) because
I want my reasoning to be very clear and examined very closely.  I
really don't want to break printk()...

The first patch surrounds a "*** XXX printk messages dropped ***"
message with newlines, to improve readability.

The second patch changes how two global variables are initialized,
allowing the second patch to assume they always hold certain values.

The third patch simplifies some code based on the observation that
the LOG_CONT and LOG_NEWLINE flags are mutually exclusive.

The fourth and fifth patch fix a bug in two places.  The bug is
that a LOG_PREFIX in a record should implicitly terminate its
predecessor, even if the predecessor was marked LOG_CONT.

The sixth patch inserts a newline in /dev/kmsg output in the
event a LOG_PREFIX record follows a LOG_CONT record.

One trivial final patch is included at the end of the series.

					-Alex

History:
v3: - Inserted a patch to report dropped message on a new line.
    - Dropped a hunk from the (now) third patch, as requested.
    - Now insert a newline in msg_print_text() in addition to
      devkmsg_read().
    - Added Reviewed-by tags where appropriate.
v2: - Added a patch to initialize two globals with LOG_NEWLINE.
    - Changed the (now) second patch to argue that LOG_CONT and
      LOG_NEWLINES are mutally exclusive.
    - Added a patch to insert a newline in one case in devkmsg_read().
    - Added some extra parentheses in some conditions, as requested.
    - Fixed and updated some header commentary.
    - Deleted a hunk in the typo patch, as requested.

This series, based on v3.16-rc5, is available here:
    http://git.linaro.org/landing-teams/working/broadcom/kernel.git
    Branch review/printk-flags-v3

Alex Elder (7):
  printk: report dropped messages on separate line
  printk: initialize syslog_prev and console_prev
  printk: LOG_CONT and LOG_NEWLINE are opposites
  printk: honor LOG_PREFIX in devkmsg_read()
  printk: honor LOG_PREFIX in msg_print_text()
  printk: insert newline in devkmsg_read()
  printk: correct some more typos

 kernel/printk/printk.c | 75 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 45 insertions(+), 30 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-18 19:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 14:14 [PATCH v3 0/7] printk: start simplifying some flags Alex Elder
2014-07-18 14:14 ` [PATCH v3 1/7] printk: report dropped messages on separate line Alex Elder
2014-07-18 19:21   ` Alex Elder
2014-07-18 14:14 ` [PATCH v3 2/7] printk: initialize syslog_prev and console_prev Alex Elder
2014-07-18 14:14 ` [PATCH v3 3/7] printk: LOG_CONT and LOG_NEWLINE are opposites Alex Elder
2014-07-18 19:34   ` Alex Elder
2014-07-18 14:14 ` [PATCH v3 4/7] printk: honor LOG_PREFIX in devkmsg_read() Alex Elder
2014-07-18 14:14 ` [PATCH v3 5/7] printk: honor LOG_PREFIX in msg_print_text() Alex Elder
2014-07-18 14:14 ` [PATCH v3 6/7] printk: insert newline in devkmsg_read() Alex Elder
2014-07-18 14:14 ` [PATCH v3 7/7] printk: correct some more typos Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).