<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/pstat, branch release/9.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>The last big commit: let usr.sbin/ use WARNS=6 by default.</title>
<updated>2010-01-02T11:07:44+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2010-01-02T11:07:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=71ccf09269546d398fa847168fc74c22d6338a62'/>
<id>71ccf09269546d398fa847168fc74c22d6338a62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Avoid overflowing the swap size counters in human-readable mode</title>
<updated>2009-08-15T14:39:33+00:00</updated>
<author>
<name>Stanislav Sedov</name>
<email>stas@FreeBSD.org</email>
</author>
<published>2009-08-15T14:39:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=67c601d5f6eb2b25e2cef312253bdb4ab84d5359'/>
<id>67c601d5f6eb2b25e2cef312253bdb4ab84d5359</id>
<content type='text'>
  by introducing the new CONVERT_BLOCKS macro which operates on
  sizes already converted to number of blocks.  With this macro
  it is not longer needed to perform needless multiplication by
  blocksize just to divide on it later in CONVERT macro.

Approved by:	re (kib)
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  by introducing the new CONVERT_BLOCKS macro which operates on
  sizes already converted to number of blocks.  With this macro
  it is not longer needed to perform needless multiplication by
  blocksize just to divide on it later in CONVERT macro.

Approved by:	re (kib)
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>- Make pstat(8) WARNS=6 safe.</title>
<updated>2009-06-11T17:03:28+00:00</updated>
<author>
<name>Stanislav Sedov</name>
<email>stas@FreeBSD.org</email>
</author>
<published>2009-06-11T17:03:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=52074d389f05e672c3e845b61785f1ffdcd4ebc0'/>
<id>52074d389f05e672c3e845b61785f1ffdcd4ebc0</id>
<content type='text'>
- While here, eliminate the check for len &gt; 0 in ttymode_sysctl
  as the code is able to handle this case well.

Reviewed by:	ed (initial version)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- While here, eliminate the check for len &gt; 0 in ttymode_sysctl
  as the code is able to handle this case well.

Reviewed by:	ed (initial version)
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct my previous commit to pstat(8).</title>
<updated>2009-06-11T09:59:47+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-06-11T09:59:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=493f0f17094cc6f7c366ab86df111fe59011fcb3'/>
<id>493f0f17094cc6f7c366ab86df111fe59011fcb3</id>
<content type='text'>
Not only mark the strings inside the array as const, but do the same for
the elements of the array itself.

Submitted by:	Christoph Mallon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not only mark the strings inside the array as const, but do the same for
the elements of the array itself.

Submitted by:	Christoph Mallon
</pre>
</div>
</content>
</entry>
<entry>
<title>Make most of pstat(8) build with WARNS=6.</title>
<updated>2009-06-11T09:02:22+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-06-11T09:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=777e045cb5d49dde42f3506b58dd109e26efca03'/>
<id>777e045cb5d49dde42f3506b58dd109e26efca03</id>
<content type='text'>
There is still an issue with the nlists, which I'm not quite sure how to
solve, so I'm leaving WARNS set to 3 right now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is still an issue with the nlists, which I'm not quite sure how to
solve, so I'm leaving WARNS set to 3 right now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Serialize write() calls on TTYs.</title>
<updated>2009-02-11T16:28:49+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-11T16:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c0086bf20280407ccd3ed5a4ef984ce90f56b9ab'/>
<id>c0086bf20280407ccd3ed5a4ef984ce90f56b9ab</id>
<content type='text'>
Just like the old TTY layer, the current MPSAFE TTY layer does not make
any attempt to serialize calls of write(). Data is copied into the
kernel in 256 (TTY_STACKBUF) byte chunks. If a write() call occurs at
the same time, the data may interleave. This is especially likely when
the TTY starts blocking, because the output queue reaches the high
watermark.

I've implemented this by adding a new flag, TTY_BUSY_OUT, which is used
to mark a TTY as having a thread stuck in write(). Because I don't want
non-blocking processes to be possibly blocked by a sleeping thread, I'm
still allowing it to bypass the protection. According to this message,
the Linux kernel returns EAGAIN in such cases, but I think that's a
little too restrictive:

	http://kerneltrap.org/index.php?q=mailarchive/linux-kernel/2007/5/2/85418/thread

PR:		kern/118287
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just like the old TTY layer, the current MPSAFE TTY layer does not make
any attempt to serialize calls of write(). Data is copied into the
kernel in 256 (TTY_STACKBUF) byte chunks. If a write() call occurs at
the same time, the data may interleave. This is especially likely when
the TTY starts blocking, because the output queue reaches the high
watermark.

I've implemented this by adding a new flag, TTY_BUSY_OUT, which is used
to mark a TTY as having a thread stuck in write(). Because I don't want
non-blocking processes to be possibly blocked by a sleeping thread, I'm
still allowing it to bypass the protection. According to this message,
the Linux kernel returns EAGAIN in such cases, but I think that's a
little too restrictive:

	http://kerneltrap.org/index.php?q=mailarchive/linux-kernel/2007/5/2/85418/thread

PR:		kern/118287
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't leave the console TTY constantly open.</title>
<updated>2009-02-05T14:21:09+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-05T14:21:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c3328b2ab87a66753fdb4651e98e26f735f70093'/>
<id>c3328b2ab87a66753fdb4651e98e26f735f70093</id>
<content type='text'>
When we leave the console TTY constantly open, we never reset the
termios attributes. This causes output processing, echoing, etc. not to
be reset to the proper values when going into single user mode after the
system has booted. It also causes nl-to-crnl-conversion not to take
place during shutdown, which causes a `staircase effect'.

This patch adds a new TTY flag, TF_OPENED_CONS, which is set when the
TTY is opened through /dev/console. Because the flags are only used by
the kernel and the pstat(8) utility, I've decided to renumber the TTY
flags. This shouldn't be an issue, because the TTY layer is not yet part
of a stable release.

Reported by:	Mark Atkinson &lt;atkin901 yahoo com&gt;
Tested by:	sepotvin
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we leave the console TTY constantly open, we never reset the
termios attributes. This causes output processing, echoing, etc. not to
be reset to the proper values when going into single user mode after the
system has booted. It also causes nl-to-crnl-conversion not to take
place during shutdown, which causes a `staircase effect'.

This patch adds a new TTY flag, TF_OPENED_CONS, which is set when the
TTY is opened through /dev/console. Because the flags are only used by
the kernel and the pstat(8) utility, I've decided to renumber the TTY
flags. This shouldn't be an issue, because the TTY layer is not yet part
of a stable release.

Reported by:	Mark Atkinson &lt;atkin901 yahoo com&gt;
Tested by:	sepotvin
</pre>
</div>
</content>
</entry>
<entry>
<title>Clamp the values of t_column to 5 digits in `pstat -t' and `show all ttys'.</title>
<updated>2008-11-01T13:40:46+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-11-01T13:40:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=37a9f58275d8c4180eb96791fc7cbad3cf4955f5'/>
<id>37a9f58275d8c4180eb96791fc7cbad3cf4955f5</id>
<content type='text'>
We often run into these very high column numbers when we run curses
applications, because they don't print any newlines. This messes up the
table output of `pstat -t'. If these numbers get really high, they
aren't of any use to the reader anyway. Convert them to `99999' when
they run out of bounds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We often run into these very high column numbers when we run curses
applications, because they don't print any newlines. This messes up the
table output of `pstat -t'. If these numbers get really high, they
aren't of any use to the reader anyway. Convert them to `99999' when
they run out of bounds.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a hooks layer for the MPSAFE TTY layer.</title>
<updated>2008-09-22T19:25:14+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-09-22T19:25:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a1215e37a4a98f22c84d4512dd380761376e8231'/>
<id>a1215e37a4a98f22c84d4512dd380761376e8231</id>
<content type='text'>
One of the features that prevented us from fixing some of the TTY
consumers to work once again, was an interface that allowed consumers to
do the following:

- `Sniff' incoming data, which is used by the snp(4) driver.

- Take direct control of the input and output paths of a TTY, which is
  used by ng_tty(4), ppp(4), sl(4), etc.

There's no practical advantage in committing a hooks layer without
having any consumers. In P4 there is a preliminary port of snp(4) and
thompsa@ is busy porting ng_tty(4) to this interface. I already want to
have it in the tree, because this may stimulate others to work on the
remaining modules.

Discussed with:	thompsa
Obtained from:	//depot/projects/mpsafetty/...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of the features that prevented us from fixing some of the TTY
consumers to work once again, was an interface that allowed consumers to
do the following:

- `Sniff' incoming data, which is used by the snp(4) driver.

- Take direct control of the input and output paths of a TTY, which is
  used by ng_tty(4), ppp(4), sl(4), etc.

There's no practical advantage in committing a hooks layer without
having any consumers. In P4 there is a preliminary port of snp(4) and
thompsa@ is busy porting ng_tty(4) to this interface. I already want to
have it in the tree, because this may stimulate others to work on the
remaining modules.

Discussed with:	thompsa
Obtained from:	//depot/projects/mpsafetty/...
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a small typo in the pstat(8) manual page.</title>
<updated>2008-08-20T22:09:33+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-08-20T22:09:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9d5a92ee430cb0672fb6b91c9921ef0cbd071555'/>
<id>9d5a92ee430cb0672fb6b91c9921ef0cbd071555</id>
<content type='text'>
The second LOW column of the pstat(8) command refers to the low
watermark of the output queue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The second LOW column of the pstat(8) command refers to the low
watermark of the output queue.
</pre>
</div>
</content>
</entry>
</feed>
