Bug 6772 - outstanding_aio_calls never decremented
outstanding_aio_calls never decremented
Status: RESOLVED FIXED
Product: Samba 3.4
Classification: Unclassified
Component: File services
3.4.1
All Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-30 07:52 UTC by Olaf Flebbe
Modified: 2009-10-09 02:49 UTC (History)
0 users

See Also:


Attachments
proposed patch (1.15 KB, patch)
2009-09-30 07:59 UTC, Olaf Flebbe
no flags Details
git-am formatted patch that went into master. (1.69 KB, patch)
2009-09-30 19:47 UTC, Jeremy Allison
vl: review+
Details
git format patch relative to 3.4.1 test rewritten to match the JA patch (1.61 KB, text/plain)
2009-10-05 04:18 UTC, Olaf Flebbe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Flebbe 2009-09-30 07:52:48 UTC
While trying out async i/o with 3.4.1 I found out that samba works synchronous after exactly 100 aio requests. 

The variable outstanding_aio_calls is never decremented.

Since every completion should be signalled through the signal handler I propose to move the backwards counting there. I moved the increment a little bit closer to the real call, in favour not to be signalled before actually being actually incremented.

IMHO the variable should be moved out of global.h
Comment 1 Olaf Flebbe 2009-09-30 07:59:05 UTC
Created attachment 4766 [details]
proposed patch
Comment 2 Jeremy Allison 2009-09-30 10:55:04 UTC
Oh this is rather embarrassing :-). It might explain why I never saw the gains in performance from the aio code I expected. I'll evaluate this asap and get a fix into current code as soon as I'm done.

Jeremy.
Comment 3 Jeremy Allison 2009-09-30 19:47:36 UTC
Created attachment 4769 [details]
git-am formatted patch that went into master.

Volker please review and assign to Karolin for inclusion into 3.4.x if you concur.
Jeremy.
Comment 4 Karolin Seeger 2009-10-02 05:14:14 UTC
Jeremy, there is a merge conflict when applying the patch to v3-4-test.
Could you provide an updated version, please?

Thanks!
Comment 5 Olaf Flebbe 2009-10-02 05:27:57 UTC
maybe use the original patch I supplied. This was relative to v3-4-test

Greetings
  Olaf
Comment 6 Jeremy Allison 2009-10-02 10:15:42 UTC
No the original patch misses the read path change to make both read and write paths symmetrical. I'll provide an updated patch later today.
Jeremy.
Comment 7 Olaf Flebbe 2009-10-05 04:18:35 UTC
Created attachment 4783 [details]
git format patch relative to 3.4.1 test rewritten to match the JA patch
Comment 8 Volker Lendecke 2009-10-09 02:44:47 UTC
The last patch by Olaf (https://bugzilla.samba.org/attachment.cgi?id=4783) looks good. Karolin, please pull for 3.4.3.

Thanks,

Volker
Comment 9 Karolin Seeger 2009-10-09 02:49:31 UTC
Pushed to v3-4-test, will be inlcuded in the next 3.4 bug fix release.
Closing out bug report.

Thanks!