tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Add support for fifo files (mkfifo(2)) to syslogd(8)

On Nov 8, 10:29pm, (Anthony Mallet) wrote:
-- Subject: Re: Add support for fifo files (mkfifo(2)) to syslogd(8)

| On Friday, at 15:49, Christos Zoulas wrote:
| | The third part of the patch (the flipped check) also looks correct, because
| | you want to find a type that will fit the filled entry.
| Also, as far as I understand the message_queue_purge() function and the 
| that describes it, you want to limit the number of elements in the queue. 
| "while (max length <= current length) drop()".


| | Looks good. My only question is if we should change the FIFO and PIPE 
| | to writev1's so that we have a better chance to put in complete messages in
| | the slow reader case.
| I was initially considering this solution too. But unless I missed something
| obvious, writev1() can delay the whole syslogd process up to 2500ms in case of
| a very very slow reader. The "queue" approach hasn't this drawback (only the
| slow reader is impacted, not the other log files). If you think the 2500ms
| delay are not an issue, I can update my patch.

It is a trade-off. I was more worried about incomplete messages, but you are
right. 2.5 seconds is a long time for syslog to sleep...


Home | Main Index | Thread Index | Old Index