Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 640862 Details for
Bug 830799
Nodes do not agree on CPG membership, messages lost
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch - part 6 - Add waiting_trans_ack also to fragmentation layer
2012-11-08-0003-Add-waiting_trans_ack-also-to-fragmentation-layer.patch (text/plain), 9.44 KB, created by
Jan Friesse
on 2012-11-08 15:01:33 UTC
(
hide
)
Description:
Proposed patch - part 6 - Add waiting_trans_ack also to fragmentation layer
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2012-11-08 15:01:33 UTC
Size:
9.44 KB
patch
obsolete
>From c5fd82a635fab0b29ecc24510514a21783173339 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Thu, 8 Nov 2012 15:24:26 +0100 >Subject: [PATCH 3/3] Add waiting_trans_ack also to fragmentation layer > >Patch for support waiting_trans_ack may fail if there is synchronization >happening between delivery of fragmented message. In such situation, >fragmentation layer is waiting for message with correct number, but it >will never arrive. > >Solution is to handle (callback) change of waiting_trans_ack and use >different queue. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >(backported from neddle) >--- > exec/totemmrp.c | 7 +++- > exec/totemmrp.h | 5 ++- > exec/totempg.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++------- > exec/totemsrp.c | 12 +++++++- > exec/totemsrp.h | 4 ++- > 5 files changed, 97 insertions(+), 17 deletions(-) > >diff --git a/exec/totemmrp.c b/exec/totemmrp.c >index 56fb9b0..4e588a5 100644 >--- a/exec/totemmrp.c >+++ b/exec/totemmrp.c >@@ -130,7 +130,9 @@ int totemmrp_initialize ( > const unsigned int *member_list, size_t member_list_entries, > const unsigned int *left_list, size_t left_list_entries, > const unsigned int *joined_list, size_t joined_list_entries, >- const struct memb_ring_id *ring_id)) >+ const struct memb_ring_id *ring_id), >+ void (*waiting_trans_ack_cb_fn) ( >+ int waiting_trans_ack)) > { > int result; > pg_deliver_fn = deliver_fn; >@@ -143,7 +145,8 @@ int totemmrp_initialize ( > totem_config, > stats->mrp, > totemmrp_deliver_fn, >- totemmrp_confchg_fn); >+ totemmrp_confchg_fn, >+ waiting_trans_ack_cb_fn); > > return (result); > } >diff --git a/exec/totemmrp.h b/exec/totemmrp.h >index d477648..7096358 100644 >--- a/exec/totemmrp.h >+++ b/exec/totemmrp.h >@@ -70,7 +70,10 @@ extern int totemmrp_initialize ( > const unsigned int *member_list, size_t member_list_entries, > const unsigned int *left_list, size_t left_list_entries, > const unsigned int *joined_list, size_t joined_list_entries, >- const struct memb_ring_id *ring_id)); >+ const struct memb_ring_id *ring_id), >+ void (*waiting_trans_ack_cb_fn) ( >+ int waiting_trans_ack)); >+ > > extern void totemmrp_finalize (void); > >diff --git a/exec/totempg.c b/exec/totempg.c >index 7c58e38..d41e548 100644 >--- a/exec/totempg.c >+++ b/exec/totempg.c >@@ -204,6 +204,10 @@ static int callback_token_received_fn (enum totem_callback_token_type type, > > DECLARE_LIST_INIT(assembly_list_inuse); > >+DECLARE_LIST_INIT(assembly_list_inuse_trans); >+ >+DECLARE_LIST_INIT(assembly_list_free_trans); >+ > DECLARE_LIST_INIT(assembly_list_free); > > /* >@@ -224,6 +228,8 @@ static int fragment_continuation = 0; > > static struct iovec iov_delv; > >+static int totempg_waiting_transack = 0; >+ > static unsigned int totempg_max_handle = 0; > > struct totempg_group_instance { >@@ -269,16 +275,32 @@ static int msg_count_send_ok (int msg_count); > > static int byte_count_send_ok (int byte_count); > >+static void totempg_waiting_trans_ack_cb (int waiting_trans_ack) >+{ >+ log_printf(LOG_DEBUG, "waiting_trans_ack changed to %u", waiting_trans_ack); >+ totempg_waiting_transack = waiting_trans_ack; >+} >+ > static struct assembly *assembly_ref (unsigned int nodeid) > { > struct assembly *assembly; > struct list_head *list; >+ struct list_head *active_assembly_list_inuse; >+ struct list_head *active_assembly_list_free; >+ >+ if (totempg_waiting_transack) { >+ active_assembly_list_inuse = &assembly_list_inuse_trans; >+ active_assembly_list_free = &assembly_list_free_trans; >+ } else { >+ active_assembly_list_inuse = &assembly_list_inuse; >+ active_assembly_list_free = &assembly_list_free; >+ } > > /* > * Search inuse list for node id and return assembly buffer if found > */ >- for (list = assembly_list_inuse.next; >- list != &assembly_list_inuse; >+ for (list = active_assembly_list_inuse->next; >+ list != active_assembly_list_inuse; > list = list->next) { > > assembly = list_entry (list, struct assembly, list); >@@ -291,10 +313,10 @@ static struct assembly *assembly_ref (unsigned int nodeid) > /* > * Nothing found in inuse list get one from free list if available > */ >- if (list_empty (&assembly_list_free) == 0) { >- assembly = list_entry (assembly_list_free.next, struct assembly, list); >+ if (list_empty (active_assembly_list_free) == 0) { >+ assembly = list_entry (active_assembly_list_free->next, struct assembly, list); > list_del (&assembly->list); >- list_add (&assembly->list, &assembly_list_inuse); >+ list_add (&assembly->list, active_assembly_list_inuse); > assembly->nodeid = nodeid; > assembly->index = 0; > assembly->last_frag_num = 0; >@@ -316,15 +338,55 @@ static struct assembly *assembly_ref (unsigned int nodeid) > assembly->last_frag_num = 0; > assembly->throw_away_mode = THROW_AWAY_INACTIVE; > list_init (&assembly->list); >- list_add (&assembly->list, &assembly_list_inuse); >+ list_add (&assembly->list, active_assembly_list_inuse); > > return (assembly); > } > > static void assembly_deref (struct assembly *assembly) > { >+ struct list_head *active_assembly_list_free; >+ >+ if (totempg_waiting_transack) { >+ active_assembly_list_free = &assembly_list_free_trans; >+ } else { >+ active_assembly_list_free = &assembly_list_free; >+ } >+ > list_del (&assembly->list); >- list_add (&assembly->list, &assembly_list_free); >+ list_add (&assembly->list, active_assembly_list_free); >+} >+ >+static void assembly_deref_from_normal_and_trans (int nodeid) >+{ >+ int j; >+ struct list_head *list, *list_next; >+ struct list_head *active_assembly_list_inuse; >+ struct list_head *active_assembly_list_free; >+ struct assembly *assembly; >+ >+ for (j = 0; j < 2; j++) { >+ if (j == 0) { >+ active_assembly_list_inuse = &assembly_list_inuse; >+ active_assembly_list_free = &assembly_list_free; >+ } else { >+ active_assembly_list_inuse = &assembly_list_inuse_trans; >+ active_assembly_list_free = &assembly_list_free_trans; >+ } >+ >+ for (list = active_assembly_list_inuse->next; >+ list != active_assembly_list_inuse; >+ list = list_next) { >+ >+ list_next = list->next; >+ assembly = list_entry (list, struct assembly, list); >+ >+ if (nodeid == assembly->nodeid) { >+ list_del (&assembly->list); >+ list_add (&assembly->list, active_assembly_list_free); >+ } >+ } >+ } > } > > static inline void app_confchg_fn ( >@@ -336,7 +398,6 @@ static inline void app_confchg_fn ( > { > int i; > struct totempg_group_instance *instance; >- struct assembly *assembly; > unsigned int res; > > /* >@@ -345,9 +406,7 @@ static inline void app_confchg_fn ( > * In the leaving processor's assembly buffer. > */ > for (i = 0; i < left_list_entries; i++) { >- assembly = assembly_ref (left_list[i]); >- list_del (&assembly->list); >- list_add (&assembly->list, &assembly_list_free); >+ assembly_deref_from_normal_and_trans (left_list[i]); > } > for (i = 0; i <= totempg_max_handle; i++) { > res = hdb_handle_get (&totempg_groups_instance_database, >@@ -647,6 +706,8 @@ static void totempg_deliver_fn ( > } > } > } else { >+ log_printf (LOG_DEBUG, "fragmented continuation %u is not equal to assembly last_frag_num %u", >+ continuation, assembly->last_frag_num); > assembly->throw_away_mode = THROW_AWAY_ACTIVE; > } > } >@@ -753,7 +814,8 @@ int totempg_initialize ( > totem_config, > &totempg_stats, > totempg_deliver_fn, >- totempg_confchg_fn); >+ totempg_confchg_fn, >+ totempg_waiting_trans_ack_cb); > > totemmrp_callback_token_create ( > &callback_token_received_handle, >diff --git a/exec/totemsrp.c b/exec/totemsrp.c >index 0c18493..e383f7e 100644 >--- a/exec/totemsrp.c >+++ b/exec/totemsrp.c >@@ -459,6 +459,9 @@ struct totemsrp_instance { > > void (*totemsrp_service_ready_fn) (void); > >+ void (*totemsrp_waiting_trans_ack_cb_fn) ( >+ int waiting_trans_ack); >+ > int global_seqno; > > int my_token_held; >@@ -781,7 +784,9 @@ int totemsrp_initialize ( > const unsigned int *member_list, size_t member_list_entries, > const unsigned int *left_list, size_t left_list_entries, > const unsigned int *joined_list, size_t joined_list_entries, >- const struct memb_ring_id *ring_id)) >+ const struct memb_ring_id *ring_id), >+ void (*waiting_trans_ack_cb_fn) ( >+ int waiting_trans_ack)) > { > struct totemsrp_instance *instance; > unsigned int res; >@@ -808,6 +813,9 @@ int totemsrp_initialize ( > > totemsrp_instance_initialize (instance); > >+ instance->totemsrp_waiting_trans_ack_cb_fn = waiting_trans_ack_cb_fn; >+ instance->totemsrp_waiting_trans_ack_cb_fn (1); >+ > stats->srp = &instance->stats; > instance->stats.latest_token = 0; > instance->stats.earliest_token = 0; >@@ -1782,6 +1790,7 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance) > left_list, instance->my_left_memb_entries, > 0, 0, &instance->my_ring_id); > instance->waiting_trans_ack = 1; >+ instance->totemsrp_waiting_trans_ack_cb_fn (1); > > // TODO we need to filter to ensure we only deliver those > // messages which are part of instance->my_deliver_memb >@@ -4564,4 +4573,5 @@ void totemsrp_trans_ack (void *context) > struct totemsrp_instance *instance = (struct totemsrp_instance *)context; > > instance->waiting_trans_ack = 0; >+ instance->totemsrp_waiting_trans_ack_cb_fn (0); > } >diff --git a/exec/totemsrp.h b/exec/totemsrp.h >index f6e172f..840ffdf 100644 >--- a/exec/totemsrp.h >+++ b/exec/totemsrp.h >@@ -62,7 +62,9 @@ int totemsrp_initialize ( > const unsigned int *member_list, size_t member_list_entries, > const unsigned int *left_list, size_t left_list_entries, > const unsigned int *joined_list, size_t joined_list_entries, >- const struct memb_ring_id *ring_id)); >+ const struct memb_ring_id *ring_id), >+ void (*waiting_trans_ack_cb_fn) ( >+ int waiting_trans_ack)); > > void totemsrp_finalize (void *srp_context); > >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 830799
:
591832
|
591833
|
591834
|
640856
|
640861
| 640862