From: Jerin Jacob <jerinjacobk@gmail.com>
To: Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>, dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] event/octeontx2: relax memory requirement for event timers
Date: Wed, 15 Jan 2020 17:17:43 +0530 [thread overview]
Message-ID: <CALBAE1NmpdVAgs6NQRn7AN=S_5aUpcpdaOFOVL-rMRx5GOcZ1g@mail.gmail.com> (raw)
In-Reply-To: <20200107131738.11932-1-pbhagavatula@marvell.com>
On Tue, Jan 7, 2020 at 6:47 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Relax memory requirement for event timers when internal mempool used is
> octeontx2 mempool.
> Add debug log to print the memory used.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Applied to dpdk-next-eventdev/master. Thanks.
> ---
> drivers/event/octeontx2/otx2_tim_evdev.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c
> index b275c6922..cd0dcde24 100644
> --- a/drivers/event/octeontx2/otx2_tim_evdev.c
> +++ b/drivers/event/octeontx2/otx2_tim_evdev.c
> @@ -327,7 +327,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr)
> tim_optimze_bkt_param(tim_ring);
> }
>
> - tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts;
> + if (tim_ring->disable_npa)
> + tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts;
> + else
> + tim_ring->nb_chunks = tim_ring->nb_chunks + tim_ring->nb_bkts;
> +
> /* Create buckets. */
> tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) *
> sizeof(struct otx2_tim_bkt),
> @@ -376,6 +380,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr)
> RTE_EVENT_TYPE_TIMER);
> sso_xae_reconfigure(dev->event_dev);
>
> + otx2_tim_dbg("Total memory used %"PRIu64"MB\n",
> + (uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz)
> + + (tim_ring->nb_bkts * sizeof(struct otx2_tim_bkt))) /
> + BIT_ULL(20)));
> +
> return rc;
>
> chnk_mem_err:
> --
> 2.17.1
>
prev parent reply other threads:[~2020-01-15 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 13:17 pbhagavatula
2020-01-15 11:47 ` Jerin Jacob [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALBAE1NmpdVAgs6NQRn7AN=S_5aUpcpdaOFOVL-rMRx5GOcZ1g@mail.gmail.com' \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=pbhagavatula@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).