Hi Hoang ,
On 9/27/2016 10:35 AM, Hoang Vo wrote:
> Solution:
> Remove unnecessary checking that cost time. imm will take the role of checking
-which one cpnd_get_longDnsAllowed_attr() or
osaf_is_an_extended_name() ?
-I see multiple calls of osaf_is_an_extended_name() in cpnd are thy out
of IMM context ? please check
-Is this only case with CPND ? ntfsv , amfnd is also making this
calls why it is effecting only CPD
-AVM
On 9/27/2016 10:35 AM, Hoang Vo wrote:
> osaf/services/saf/cpsv/cpd/cpd_db.c | 3 +++
> osaf/services/saf/cpsv/cpd/cpd_evt.c | 4 +++-
> osaf/services/saf/cpsv/cpnd/cpnd_evt.c | 12 ------------
> 3 files changed, 6 insertions(+), 13 deletions(-)
>
>
> Problem:
> Statistically the check point create time for SC and PL (sync and async) has
> degradation more than 30% after bring in patch 8004
>
> Solution:
> Remove unnecessary checking that cost time. imm will take the role of checking
>
> diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c
> b/osaf/services/saf/cpsv/cpd/cpd_db.c
> --- a/osaf/services/saf/cpsv/cpd/cpd_db.c
> +++ b/osaf/services/saf/cpsv/cpd/cpd_db.c
> @@ -106,6 +106,9 @@ uint32_t cpd_ckpt_node_add(NCS_PATRICIA_
> err = create_runtime_ckpt_object(ckpt_node, immOiHandle);
> if (err != SA_AIS_OK) {
> LOG_ER("create runtime ckpt object failed with error:
> %u",err);
> + if (err == SA_AIS_ERR_INVALID_PARAM) {
> + return NCSCC_RC_FAILURE|NCSCC_RC_INVALID_INPUT;
> + }
> return NCSCC_RC_FAILURE;
> }
> }
> diff --git a/osaf/services/saf/cpsv/cpd/cpd_evt.c
> b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> --- a/osaf/services/saf/cpsv/cpd/cpd_evt.c
> +++ b/osaf/services/saf/cpsv/cpd/cpd_evt.c
> @@ -238,9 +238,11 @@ static uint32_t cpd_evt_proc_ckpt_create
> rc = SA_AIS_ERR_NO_MEMORY;
> goto send_rsp;
> } else if (proc_rc != NCSCC_RC_SUCCESS) {
> -
> TRACE_4("cpd ckpt create failure ckpt name,dest : %s,
> %"PRIu64, ckpt_name, sinfo->dest);
> rc = SA_AIS_ERR_LIBRARY;
> + if (proc_rc&NCSCC_RC_INVALID_INPUT) {
> + rc = SA_AIS_ERR_INVALID_PARAM;
> + }
> goto send_rsp;
> }
>
> diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
> b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
> --- a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
> +++ b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
> @@ -605,12 +605,6 @@ static uint32_t cpnd_evt_proc_ckpt_open(
> TRACE_ENTER();
> memset(&send_evt, '\0', sizeof(CPSV_EVT));
>
> - if ((cpnd_get_longDnsAllowed_attr() == 0) &&
> osaf_is_an_extended_name(&evt->info.openReq.ckpt_name)) {
> - LOG_ER("cpnd - longDnsAllowed == false - NOT supporting
> extended name");
> - send_evt.info.cpa.info.openRsp.error = SA_AIS_ERR_INVALID_PARAM;
> - goto agent_rsp;
> - }
> -
> if (!cpnd_is_cpd_up(cb)) {
> send_evt.info.cpa.info.openRsp.error = SA_AIS_ERR_TRY_AGAIN;
> goto agent_rsp;
> @@ -1137,12 +1131,6 @@ static uint32_t cpnd_evt_proc_ckpt_unlin
> TRACE_ENTER();
> memset(&send_evt, '\0', sizeof(CPSV_EVT));
>
> - if ((cpnd_get_longDnsAllowed_attr() == 0) &&
> osaf_is_an_extended_name(&evt->info.ulinkReq.ckpt_name)) {
> - LOG_ER("cpnd - longDnsAllowed == false - NOT supporting
> extended name");
> - send_evt.info.cpa.info.ulinkRsp.error =
> SA_AIS_ERR_INVALID_PARAM;
> - goto agent_rsp;
> - }
> -
> if (!cpnd_is_cpd_up(cb)) {
> send_evt.info.cpa.info.ulinkRsp.error = SA_AIS_ERR_TRY_AGAIN;
> goto agent_rsp;
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel