All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Hall <mhall-Hv3ogNYU3JfZZajBQzqCxQ@public.gmane.org>
To: linhaifeng <haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH v2] support free hugepages
Date: Wed, 29 Oct 2014 20:17:37 -0700	[thread overview]
Message-ID: <20141030031737.GB3286@mhcomputing.net> (raw)
In-Reply-To: <1414561659-7408-1-git-send-email-haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Wed, Oct 29, 2014 at 01:47:39PM +0800, linhaifeng wrote:
> +int
> +rte_eal_hugepage_free(void)
> +{
> +	struct hugepage_file *hugepg_tbl = g_hugepage_table.hugepg_tbl;
> +	unsigned i;
> +	unsigned nr_hugefiles = g_hugepage_table.nr_hugefiles;
> +	int ret = 0;
> +
> +	for (i = 0; i < nr_hugefiles; i++) {
> +		ret = unlink(hugepg_tbl[i].filepath);
> +		if (ret != 0) {
> +			RTE_LOG(ERR, EAL, "Failed to unlink %s", hugepg_tbl[i].filepath);
> +			return ret;

I would say, don't exit just because one couldn't be freed. Free everything 
you can but exit with an error so people can know what happened.

Thanks for the patch, good idea!

Matthew.

  parent reply	other threads:[~2014-10-30  3:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  5:47 [PATCH v2] support free hugepages linhaifeng
2014-10-29  6:14 ` Qiu, Michael
     [not found]   ` <533710CFB86FA344BFBF2D6802E60286C7CBAE-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-10-29  6:40     ` Linhaifeng
2014-10-29  8:04       ` Qiu, Michael
     [not found]         ` <533710CFB86FA344BFBF2D6802E60286C7CC55-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-10-29  8:15           ` Linhaifeng
     [not found] ` <1414561659-7408-1-git-send-email-haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-10-30  3:17   ` Matthew Hall [this message]
2014-10-30 15:32   ` 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=20141030031737.GB3286@mhcomputing.net \
    --to=mhall-hv3ognyu3jfzzajbqzqcxq@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.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.