linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Li Zhong <zhong@linux.vnet.ibm.com>,
	PowerPC email list <linuxppc-dev@lists.ozlabs.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [RFC, powerpc] perf/hv-24x7 set the attr group to NULL if events failed to be initialized
Date: Wed, 25 Mar 2015 20:51:20 +1100 (AEDT)	[thread overview]
Message-ID: <20150325095120.8F48F1400EA@ozlabs.org> (raw)
In-Reply-To: <1423993377.2932.23.camel@TP420>

On Sun, 2015-15-02 at 09:42:57 UTC, Li Zhong wrote:
> sysfs_create_groups() creates groups one by one in the attr_groups array
> before a NULL entry is encountered. But if an error is seen, it stops
> and removes all the groups already created:
>         for (i = 0; groups[i]; i++) {
>                 error = sysfs_create_group(kobj, groups[i]);
>                 if (error) {
>                         while (--i >= 0)
>                                 sysfs_remove_group(kobj, groups[i]);
>                         break;
>                 }
>         }
> 
> And for the three event groups of 24x7, if it is not supported,
> according to the above logic, it causes format and interface group to be
> removed because of the error.
> 
> This patch moves the three events groups to the end of the attr groups,
> and if create_events_from_catalog() fails to set their attributes, we
> set them to NULL in attr_groups.

But why are we continuing at all if create_events_from_catalog() fails?

Shouldn't that just be a fatal error and we bail?

cheers

  reply	other threads:[~2015-03-25  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15  9:42 [RFC PATCH powerpc] perf/hv-24x7 set the attr group to NULL if events failed to be initialized Li Zhong
2015-03-25  9:51 ` Michael Ellerman [this message]
2015-03-25 18:41   ` [RFC, " Sukadev Bhattiprolu
2015-03-26  3:51     ` Michael Ellerman
2015-04-10  8:42       ` [RFC v2 powerpc] perf/hv-24x7 fail 24x7 initcall if create_events_from_catalog() fails Li Zhong
2015-04-10 10:55         ` Michael Ellerman
2015-04-13  7:48           ` [PATCH v3 " Li Zhong

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=20150325095120.8F48F1400EA@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=zhong@linux.vnet.ibm.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).