Re: Replace/rewrite reverse.c for tail(1)

1999-07-29 Thread David G. Andersen
Message----- > > From: Kevin Day [mailto:toa...@dragondata.com] > > Sent: Wednesday, July 28, 1999 3:09 AM > > To: hack...@freebsd.org > > Subject: Replace/rewrite reverse.c for tail(1) > > > > An application I use quite often requires me to reverse the lines in the

Re: Replace/rewrite reverse.c for tail(1)

1999-07-29 Thread David G. Andersen
ssage----- > > From: Kevin Day [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 28, 1999 3:09 AM > > To: [EMAIL PROTECTED] > > Subject: Replace/rewrite reverse.c for tail(1) > > > > An application I use quite often requires me to reverse the lines in the >

Re: Replace/rewrite reverse.c for tail(1)

1999-07-29 Thread John S. Dyson
Charles Randall said: > > Out of 128M of ram, it's swapped nearly everything else out to keep 85M of > this 400M file in ram, even though it will never touch it again. :) > > I see two possible fixes for this. One could be madvise'ing periodically > with MADV_DONTNEED. If I understand correctly,

Re: Replace/rewrite reverse.c for tail(1)

1999-07-29 Thread John S. Dyson
Charles Randall said: > > Out of 128M of ram, it's swapped nearly everything else out to keep 85M of > this 400M file in ram, even though it will never touch it again. :) > > I see two possible fixes for this. One could be madvise'ing periodically > with MADV_DONTNEED. If I understand correctly,

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Matthew Dillon
:Wow, that's interesting. While I never looked at the code, I *thought* I was :able to measure a speed boost in a certain large embedded application I'm :working on, with adding some madvise()'s in to mmap'ed files. (Streaming :video madvise'ed with MADV_SEQUENTIAL seemed to be slightly faster, but

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
> > :Because of licensing restrictions in our product, we are unable to ship with > :any GNU/GPL'ed tools, so I'm forced to fix 'tail' rather than use tac. (I > :saw tac, and agree that it is faster for this specific use) > : > :Any VM people wanna pipe up and make a suggestion so that I may make

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Matthew Dillon
:Because of licensing restrictions in our product, we are unable to ship with :any GNU/GPL'ed tools, so I'm forced to fix 'tail' rather than use tac. (I :saw tac, and agree that it is faster for this specific use) : :Any VM people wanna pipe up and make a suggestion so that I may make up a :patch?

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Matthew Dillon
:Wow, that's interesting. While I never looked at the code, I *thought* I was :able to measure a speed boost in a certain large embedded application I'm :working on, with adding some madvise()'s in to mmap'ed files. (Streaming :video madvise'ed with MADV_SEQUENTIAL seemed to be slightly faster, bu

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
> > :Because of licensing restrictions in our product, we are unable to ship with > :any GNU/GPL'ed tools, so I'm forced to fix 'tail' rather than use tac. (I > :saw tac, and agree that it is faster for this specific use) > : > :Any VM people wanna pipe up and make a suggestion so that I may make

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
999 3:09 AM > To: hack...@freebsd.org > Subject: Replace/rewrite reverse.c for tail(1) > > An application I use quite often requires me to reverse the lines in the > file to get the desired output. > > 'tail -r' appears to be very inefficient in it's use of mma

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Matthew Dillon
:Because of licensing restrictions in our product, we are unable to ship with :any GNU/GPL'ed tools, so I'm forced to fix 'tail' rather than use tac. (I :saw tac, and agree that it is faster for this specific use) : :Any VM people wanna pipe up and make a suggestion so that I may make up a :patch

Re: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
09 AM > To: [EMAIL PROTECTED] > Subject: Replace/rewrite reverse.c for tail(1) > > An application I use quite often requires me to reverse the lines in the > file to get the desired output. > > 'tail -r' appears to be very inefficient in it's use of mmap(). It m

RE: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Charles Randall
I'd suggest that you use "tac" from GNU textutils. Charles -Original Message- From: Kevin Day [mailto:toa...@dragondata.com] Sent: Wednesday, July 28, 1999 3:09 AM To: hack...@freebsd.org Subject: Replace/rewrite reverse.c for tail(1) An application I use quite often

RE: Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Charles Randall
I'd suggest that you use "tac" from GNU textutils. Charles -Original Message- From: Kevin Day [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 28, 1999 3:09 AM To: [EMAIL PROTECTED] Subject: Replace/rewrite reverse.c for tail(1) An application I use quite often require

Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
An application I use quite often requires me to reverse the lines in the file to get the desired output. 'tail -r' appears to be very inefficient in it's use of mmap(). It mmap's the entire file in, which encourages the kernel to swap out the rest of the system to keep pages of the input file in

Replace/rewrite reverse.c for tail(1)

1999-07-28 Thread Kevin Day
An application I use quite often requires me to reverse the lines in the file to get the desired output. 'tail -r' appears to be very inefficient in it's use of mmap(). It mmap's the entire file in, which encourages the kernel to swap out the rest of the system to keep pages of the input file in