All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>, dev <dev@dpdk.org>,
	 Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal: fix mem alloc from control thread if socket 0 is unused
Date: Fri, 5 Nov 2021 15:26:43 +0100	[thread overview]
Message-ID: <CAJFAV8ze0YW07xUb9zt-efd8TuVaJYLSBRB-F6iOAaGeFKk1JA@mail.gmail.com> (raw)
In-Reply-To: <YYOfuiQe6rHoeS+U@arsenic.home>

On Thu, Nov 4, 2021 at 9:54 AM Olivier Matz <olivier.matz@6wind.com> wrote:
> > > From: Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
> > >
> > > When using rte_malloc() from a control thread, the used heap is the one
> > > from numa socket 0, which may not have available memory.
> > >
> > > Fix this by selecting the first socket which has available memory.
> > >
> > > Note: malloc_get_numa_socket() is only used from one .c file, so move
> > > it there, and remove the inline keyword.
> > >
> > > Fixes: b94580d6887e ("malloc: avoid unknown socket id")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
> > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Acked-by: David Marchand <david.marchand@redhat.com>



> I didn't know this was possible (and still wonder in which case it can
> be useful). But yes, I can send a new version with an updated title and
> commit log. What about this one below?

No need for a v2, I took your suggestion.
Applied, thanks.

>
>   eal: fix mem alloc from thread having unknown socket id
>
>   When using rte_malloc() from a thread which is not bound to a numa
>   socket (the typical case is a control thread, but it can also happen
>   on a dataplane thread if its cpu affinity is on cores attached to
>   several sockets), the used heap is the one from numa socket 0, which
>   may not have available memory.
>
>   Fix this by selecting the first socket which has available memory.
>
>   Note: malloc_get_numa_socket() is only used from one .c file, so move
>   it there, and remove the inline keyword.
>


-- 
David Marchand


      reply	other threads:[~2021-11-05 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  9:49 [dpdk-dev] [PATCH] eal: fix mem alloc from control thread if socket 0 is unused Olivier Matz
2021-11-03 20:26 ` David Marchand
2021-11-04  8:54   ` Olivier Matz
2021-11-05 14:26     ` David Marchand [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=CAJFAV8ze0YW07xUb9zt-efd8TuVaJYLSBRB-F6iOAaGeFKk1JA@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=ilyes.ben_hamouda@6wind.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /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.