All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v2 4/4] cache/slow-path: reduce cache align requirement for 128-byte cache targets
Date: Fri, 11 Dec 2015 19:26:33 +0530	[thread overview]
Message-ID: <20151211135631.GA23152@localhost.localdomain> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB97725836AD2A79@irsmsx105.ger.corp.intel.com>

On Fri, Dec 11, 2015 at 12:55:57PM +0000, Ananyev, Konstantin wrote:
> Hi Jerin,
>
> > -----Original Message-----
> > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> > Sent: Thursday, December 10, 2015 4:36 PM
> > To: dev@dpdk.org
> > Cc: thomas.monjalon@6wind.com; Ananyev, Konstantin; viktorin@rehivetech.com; jianbo.liu@linaro.org; Jerin Jacob
> > Subject: [dpdk-dev] [PATCH v2 4/4] cache/slow-path: reduce cache align requirement for 128-byte cache targets
> >
> > slow-path data structures need not be 128-byte cache aligned.
> > Reduce the alignment to 64-byte to save the memory.
> >
> > No behavior change for 64-byte cache aligned systems as minimum
> > cache line size as 64.
> >
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > ---
> >  lib/librte_ether/rte_ethdev.h    | 4 ++--
> >  lib/librte_mempool/rte_mempool.h | 2 +-
> >  lib/librte_ring/rte_ring.h       | 2 +-
> >  3 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> > index bada8ad..4dbf73b 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -863,7 +863,7 @@ struct rte_eth_rxq_info {
> >  	struct rte_eth_rxconf conf; /**< queue config parameters. */
> >  	uint8_t scattered_rx;       /**< scattered packets RX supported. */
> >  	uint16_t nb_desc;           /**< configured number of RXDs. */
> > -} __rte_cache_aligned;
> > +} __rte_cache_min_aligned;
> >
> >  /**
> >   * Ethernet device TX queue information structure.
> > @@ -872,7 +872,7 @@ struct rte_eth_rxq_info {
> >  struct rte_eth_txq_info {
> >  	struct rte_eth_txconf conf; /**< queue config parameters. */
> >  	uint16_t nb_desc;           /**< configured number of TXDs. */
> > -} __rte_cache_aligned;
> > +} __rte_cache_min_aligned;
> >
> >  /** Maximum name length for extended statistics counters */
> >  #define RTE_ETH_XSTATS_NAME_SIZE 64
> > diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
> > index 6e2390a..8e5d10c 100644
> > --- a/lib/librte_mempool/rte_mempool.h
> > +++ b/lib/librte_mempool/rte_mempool.h
> > @@ -92,7 +92,7 @@ struct rte_mempool_debug_stats {
> >  	uint64_t get_success_objs; /**< Objects successfully allocated. */
> >  	uint64_t get_fail_bulk;    /**< Failed allocation number. */
> >  	uint64_t get_fail_objs;    /**< Objects that failed to be allocated. */
> > -} __rte_cache_aligned;
> > +} __rte_cache_min_aligned;
> >  #endif
> >
> >  #if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
> > diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
> > index de036ce..33166aa 100644
> > --- a/lib/librte_ring/rte_ring.h
> > +++ b/lib/librte_ring/rte_ring.h
> > @@ -123,7 +123,7 @@ struct rte_ring_debug_stats {
> >  	uint64_t deq_success_objs; /**< Objects successfully dequeued. */
> >  	uint64_t deq_fail_bulk;    /**< Failed dequeues number. */
> >  	uint64_t deq_fail_objs;    /**< Objects that failed to be dequeued. */
> > -} __rte_cache_aligned;
> > +} __rte_cache_min_aligned;
> >  #endif
>
> I think we better keep both struct rte_ring_debug_stats and rte_mempool_debug_stats
> as __rte_cache_aligned.
> Both are on a  per core basis and can be used at run-time
> (when RTE_LIBRTE_RING_DEBUG/RTE_LIBRTE_MEMPOOL_DEBUG=y),
> and not supposed to be shared by different cores.
> All other things in the series look good to me.

OK, I will fix the alignment of rte_ring_debug_stats and
rte_mempool_debug_stats and send the next revision with your ACK.

Jerin


> BTW, by some reason I can't find that series in the patchworks.
> Konstantin
>
>
> >
> >  #define RTE_RING_NAMESIZE 32 /**< The maximum length of a ring name. */
> > --
> > 2.1.0
>

  parent reply	other threads:[~2015-12-11 13:56 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 15:59 [PATCH 0/2] fix performance/cache resource issues with 128-byte cache line targets Jerin Jacob
2015-12-06 15:59 ` [PATCH 1/2] mbuf: fix performance/cache resource issue " Jerin Jacob
2015-12-07 15:21   ` Ananyev, Konstantin
2015-12-08 12:45     ` Jerin Jacob
2015-12-08 16:07       ` Ananyev, Konstantin
2015-12-08 17:49         ` Jerin Jacob
2015-12-09 13:44           ` Ananyev, Konstantin
2015-12-09 14:49             ` Jerin Jacob
2015-12-06 15:59 ` [PATCH 2/2] bitmap: optimize for 128-bytes " Jerin Jacob
2015-12-06 16:30 ` [PATCH 0/2] fix performance/cache resource issues with 128-byte " Thomas Monjalon
2015-12-07  7:26   ` Jerin Jacob
2015-12-07 11:40     ` Thomas Monjalon
2015-12-07 14:33       ` Jerin Jacob
2015-12-07 14:35         ` Thomas Monjalon
2015-12-10 16:36 ` [PATCH v2 0/4] " Jerin Jacob
2015-12-10 16:36   ` [PATCH v2 1/4] eal: Introduce new cache macro definitions Jerin Jacob
2015-12-10 16:36   ` [PATCH v2 2/4] mbuf: fix performance/cache resource issue with 128-byte cache line targets Jerin Jacob
2015-12-10 16:36   ` [PATCH v2 3/4] bitmap: optimize for 128-bytes " Jerin Jacob
2015-12-10 16:36   ` [PATCH v2 4/4] cache/slow-path: reduce cache align requirement for 128-byte cache targets Jerin Jacob
2015-12-11 12:55     ` Ananyev, Konstantin
2015-12-11 13:07       ` Thomas Monjalon
2015-12-11 13:56       ` Jerin Jacob [this message]
2015-12-11 14:42         ` Ananyev, Konstantin
2015-12-14  4:32   ` [PATCH v3 0/4] fix performance/cache resource issues with 128-byte cache line targets Jerin Jacob
2015-12-14  4:32     ` [PATCH v3 1/4] eal: Introduce new cache macro definitions Jerin Jacob
2016-01-04 13:15       ` Olivier MATZ
2016-01-06 15:10         ` Jerin Jacob
2015-12-14  4:32     ` [PATCH v3 2/4] mbuf: fix performance/cache resource issue with 128-byte cache line targets Jerin Jacob
2015-12-14  4:32     ` [PATCH v3 3/4] bitmap: optimize for 128-bytes " Jerin Jacob
2015-12-14  4:32     ` [PATCH v3 4/4] cache/slow-path: reduce cache align requirement for 128-byte cache targets Jerin Jacob
2016-01-29  7:45     ` [PATCH v4 0/4] fix performance/cache resource issues with 128-byte cache line targets Jerin Jacob
2016-01-29  7:45       ` [PATCH v4 1/4] eal: Introduce new cache line macro definitions Jerin Jacob
2016-01-29  7:45       ` [PATCH v4 2/4] mbuf: fix performance/cache resource issue with 128-byte cache line targets Jerin Jacob
2016-01-29  7:45       ` [PATCH v4 3/4] bitmap: optimize for 128-bytes " Jerin Jacob
2016-01-29  7:45       ` [PATCH v4 4/4] cache/slow-path: reduce cache align requirement for 128-byte cache targets Jerin Jacob
2016-02-08  9:31       ` [PATCH v4 0/4] fix performance/cache resource issues with 128-byte cache line targets Jerin Jacob
2016-02-08 10:24         ` Jan Viktorin
2016-02-08 10:52           ` Jerin Jacob
2016-02-08 12:56             ` Jan Viktorin
2016-02-11 11:53       ` Thomas Monjalon

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=20151211135631.GA23152@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.