cons: Clamp the amount written to the console
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 14 Aug 2017 13:45:21 +0000 (09:45 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 14 Aug 2017 21:02:20 +0000 (17:02 -0400)
commit50ea0450cd886f7abb8f2c6dbb8c3a77d7c6edb3
tree26a75dbdbcb6f442e999dcd8980cd81f19d42e5a
parenta6940a9e28bffeddf810af64c01026071244631b
cons: Clamp the amount written to the console

Large writes to the console take a long time.  Serial writes of about a
page take O(100ms).  Our kernel is currently non-preemptive, which is
based on a model of syscalls not taking too long.

Limiting the write sizes to 80 (the width of an ancient console, which
Ron will love) cuts the syscall time down to a few ms, which is within
the quantum of a process.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/cons.c