DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "You, KaisenX" <kaisenx.you@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Zhou, YidingX" <yidingx.zhou@intel.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"Matz, Olivier" <olivier.matz@6wind.com>,
	"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
	"zhoumin@loongson.cn" <zhoumin@loongson.cn>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [PATCH v5] enhance NUMA affinity heuristic
Date: Fri, 21 Apr 2023 10:12:53 +0200	[thread overview]
Message-ID: <3535353.LM0AJKV5NW@thomas> (raw)
In-Reply-To: <SJ0PR11MB6765D0DB7801183B0F5F4DB9E1609@SJ0PR11MB6765.namprd11.prod.outlook.com>

21/04/2023 04:34, You, KaisenX:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 13/04/2023 02:56, You, KaisenX:
> > > From: You, KaisenX
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > >
> > > > > I'm not comfortable with this patch.
> > > > >
> > > > > First, there is no comment in the code which helps to understand the
> > logic.
> > > > > Second, I'm afraid changing the value of the per-core variable
> > > > > _socket_id may have an impact on some applications.
> > > > >
> > > Hi Thomas, I'm sorry to bother you again, but we can't think of a
> > > better solution for now, would you please give me some suggestion, and
> > then I will modify it accordingly.
> > 
> > You need to better explain the logic
> > both in the commit message and in code comments.
> > When it will be done, it will be easier to have a discussion with other
> > maintainers and community experts.
> > Thank you
> > 
> Thank you for your reply, I'll explain my patch in more detail next.
> 
> When a DPDK application is started on only one numa node,

What do you mean by started on only one node?

> memory is allocated for only one socket.
> When interrupt threads use memory, memory may not be found 
> on the socket where the interrupt thread is currently located,

Why interrupt thread is on a different socket?

> and memory has to be reallocated on the hugepage,
> this operation can lead to performance degradation.
> 
> So my modification is in the function malloc_get_numa_socket to make sure 
> that the first socket with memory can be returned.
> 
> If you can accept my explanation and modification, I will send the V6 
> version to improve the commit message and code comments.
> 
> > > > Thank you for your reply.
> > > > First, about comments, I can submit a new patch to add comments to
> > > > help understand.
> > > > Second, if you do not change the value of the per-core variable_
> > > > socket_ id, /lib/eal/common/malloc_heap.c
> > > > malloc_get_numa_socket(void)
> > > > {
> > > >         const struct internal_config *conf = eal_get_internal_configuration();
> > > >         unsigned int socket_id = rte_socket_id();   // The return value of
> > > > "rte_socket_id()" is 1
> > > >         unsigned int idx;
> > > >
> > > >         if (socket_id != (unsigned int)SOCKET_ID_ANY)
> > > >                 return socket_id;    //so return here
> > > >
> > > > This will cause return here, This function returns the socket_id of
> > > > unallocated memory.
> > > >
> > > > If you have a better solution, I can modify it.





  reply	other threads:[~2023-04-21  8:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 10:48 [PATCH] malloc: " David Marchand
2022-12-21 11:16 ` Bruce Richardson
2022-12-21 13:50   ` Ferruh Yigit
2022-12-21 14:57 ` David Marchand
2022-12-27  9:00   ` zhoumin
2023-01-03 10:56     ` David Marchand
2023-01-03 10:58 ` [PATCH v2] " David Marchand
2023-01-03 13:32 ` [PATCH v3] " David Marchand
2023-01-31  3:23   ` You, KaisenX
2023-01-31 15:05 ` [PATCH v4] net/iavf:enhance " Kaisen You
2023-01-31 16:05   ` Thomas Monjalon
2023-02-01  5:32     ` You, KaisenX
2023-02-01 12:20 ` [PATCH v5] enhance " Kaisen You
2023-02-01 10:52   ` Jiale, SongX
2023-02-15 14:22   ` Burakov, Anatoly
2023-02-15 14:47     ` Burakov, Anatoly
2023-02-16  2:50     ` You, KaisenX
2023-03-03 14:07       ` Thomas Monjalon
2023-03-09  1:58         ` You, KaisenX
2023-04-13  0:56           ` You, KaisenX
2023-04-19 12:16             ` Thomas Monjalon
2023-04-21  2:34               ` You, KaisenX
2023-04-21  8:12                 ` Thomas Monjalon [this message]
2023-04-23  6:52                   ` You, KaisenX
2023-04-23  8:57                     ` You, KaisenX
2023-04-23 13:19                       ` Thomas Monjalon
2023-04-25  5:16   ` [PATCH v6] " Kaisen You
2023-04-27  6:57     ` Thomas Monjalon
2023-05-16  5:19       ` You, KaisenX
2023-05-23  2:50     ` [PATCH v7] " Kaisen You
2023-05-23 10:44       ` Burakov, Anatoly
2023-05-26  6:44         ` You, KaisenX
2023-05-23 12:45       ` Burakov, Anatoly
2023-05-26  6:50       ` [PATCH v8] " Kaisen You
2023-05-26  8:45       ` Kaisen You
2023-05-26 14:44         ` Burakov, Anatoly
2023-05-26 17:50           ` Stephen Hemminger
2023-05-29 10:37             ` Burakov, Anatoly
2023-06-01 14:42         ` David Marchand
2023-06-06 14:04           ` Thomas Monjalon
2023-06-12  9:36           ` Burakov, Anatoly

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=3535353.LM0AJKV5NW@thomas \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=jerinj@marvell.com \
    --cc=kaisenx.you@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=yidingx.zhou@intel.com \
    --cc=zhoumin@loongson.cn \
    /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).