Re: fix seekdir(3)

2014-03-09 Thread Philip Guenther
On Thu, Mar 6, 2014 at 10:36 AM, Ingo Schwarze schwa...@usta.de wrote: back in November 2013, following an idea by guenther@, i cooked up another optimization for seekdir(3), then failed to send out the patch. So here it is. ... With this patch, rewinddir(3) changes from always being the

Re: fix seekdir(3)

2014-03-06 Thread Ingo Schwarze
Hi, back in November 2013, following an idea by guenther@, i cooked up another optimization for seekdir(3), then failed to send out the patch. So here it is. Philip Guenther wrote on Tue, Nov 05, 2013 at 07:57:43PM -0800: On Wed, 6 Nov 2013, Ingo Schwarze wrote: * Worst case: opendir;

Re: fix seekdir(3)

2013-11-05 Thread Ingo Schwarze
Ingo Schwarze wrote on Mon, Nov 04, 2013 at 09:51:41AM +0100: I will send a minimal one-line patch to just fix the bug and do nothing else. We should get that one in quickly. Done. [...] Then i will send two cleanup patches to remove useless stuff and put the code into the right place, not

Re: fix seekdir(3)

2013-11-05 Thread Ingo Schwarze
Ingo Schwarze wrote on Mon, Nov 04, 2013 at 09:51:41AM +0100: Then i will send two cleanup patches to remove useless stuff and put the code into the right place, not changing any functionality. Done committed (thanks to Otto and Todd for checking). Finally, we can work out how to do the

Re: fix seekdir(3)

2013-11-05 Thread Philip Guenther
On Wed, 6 Nov 2013, Ingo Schwarze wrote: Ingo Schwarze wrote on Mon, Nov 04, 2013 at 09:51:41AM +0100: Finally, we can work out how to do the optimization. Probably, that will naturally factorize into two steps: (1) Use the information available in the userland buffer to avoid

Re: fix seekdir(3)

2013-11-04 Thread Philip Guenther
On Sat, Nov 2, 2013 at 5:48 PM, Ingo Schwarze schwa...@usta.de wrote: Here is an updated patch which now works correctly with Otto's regression test, with the new test i just committed, and with the test from the Perl test suite Andrew pointed out, even with threads enabled. It also survived

Re: fix seekdir(3)

2013-11-04 Thread Ingo Schwarze
Hi Philip, thanks for looking at this and for your insight. The number of aspects to keep in mind about this patch is growing, we have to disentangle. I will send a minimal one-line patch to just fix the bug and do nothing else. We should get that one in quickly. That would also be a candidate

Re: fix seekdir(3)

2013-11-04 Thread Ingo Schwarze
Ingo Schwarze wrote on Mon, Nov 04, 2013 at 09:51:41AM +0100: I will send a minimal one-line patch to just fix the bug and do nothing else. We should get that one in quickly. That would also be a candidate for -stable, i think. I hope to come round to that tonight. Here it is. This fixes

Re: fix seekdir(3)

2013-11-04 Thread Philip Guenther
On Monday, November 4, 2013, Ingo Schwarze wrote: This fixes both our own regression tests (Ottos and mine) and the perl-5.18 op/threads-dirh.t test. This is not particularly efficient, forcing getdents(2) for each readdir(3) following seekdir(3), but at least it produces correct results,

Re: fix seekdir(3)

2013-11-02 Thread Ingo Schwarze
Hi, after some more testing and proofreading, i found some issues with my libc/gen patch; please delete what i sent yesterday. Here is an updated patch which now works correctly with Otto's regression test, with the new test i just committed, and with the test from the Perl test suite Andrew

fix seekdir(3), was: update perl Module::Build

2013-11-01 Thread Ingo Schwarze
Hi, Andrew Fresh wrote on Wed, Oct 30, 2013 at 01:50:56PM -0700: Post vBSDcon I have most existing patches working with 5.18.1, the only failing so far is that with threads enabled If i understand correctly, we do not currently have threads enabled in our -current base perl 5.16, so that is

Re: fix seekdir(3), was: update perl Module::Build

2013-11-01 Thread Andrew Fresh
On Sat, Nov 02, 2013 at 05:27:38AM +0100, Ingo Schwarze wrote: Andrew Fresh wrote on Wed, Oct 30, 2013 at 01:50:56PM -0700: Post vBSDcon I have most existing patches working with 5.18.1, the only failing so far is that with threads enabled If i understand correctly, we do not currently