[PATCH] Cache messaging dgm connections
Ralph Böhme
slow at samba.org
Sat Sep 17 20:33:42 UTC 2016
Hi,
On Sat, Sep 17, 2016 at 01:35:14AM -0700, Jeremy Allison wrote:
> So here is the full patchset I'm testing with.
ah, there it is. :)
> I have a good feeling about this one (when
> running with the canary debug patch on top
> of the last patch that fixes the logic for
> looking for a free context slot I saw much
> fewer EV CONTEXT debug messages)....
>
> I'll leave this running overnight and check
> up in the morning.
I'll start one as well.
> + /* Look for an existing match first. */
> for (i=0; i<num_contexts; i++) {
> struct poll_funcs_tevent_context *ctx = state->contexts[i];
>
> - if ((ctx == NULL) || (ctx->ev == ev)) {
> + if (ctx != NULL && ctx->ev == ev) {
> + *slot = i;
> + return true;
> + }
> + }
> +
> + /* Now look for a free slot. */
> + for (i=0; i<num_contexts; i++) {
> + struct poll_funcs_tevent_context *ctx = state->contexts[i];
> +
> + if (ctx == NULL) {
d'oh! It was right in front of me multiple times and I didn't spot
it. Great catch! I really hope this is it finally.
Cheerio!
-slow
More information about the samba-technical
mailing list