public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Paul Jackson <pj@sgi.com>
Cc: sekharan@us.ibm.com, jtk@us.ibm.com, jes@sgi.com,
	linux-kernel@vger.kernel.org, linux-audit@redhat.com,
	viro@zeniv.linux.org.uk, lse-tech@lists.sourceforge.net,
	sgrubb@redhat.com, hch@lst.de
Subject: Re: [Lse-tech] [RFC][PATCH 05/10] Task watchers v2 Register cpuset task watcher
Date: Fri, 29 Sep 2006 00:52:18 -0700	[thread overview]
Message-ID: <1159516338.3286.10.camel@localhost.localdomain> (raw)
In-Reply-To: <20060928193138.963c510a.pj@sgi.com>

On Thu, 2006-09-28 at 19:31 -0700, Paul Jackson wrote:
> Matt wrote:
> 
> > -	cpuset_fork(p);
> >  #ifdef CONFIG_NUMA
> >   	p->mempolicy = mpol_copy(p->mempolicy);
> >   	if (IS_ERR(p->mempolicy)) {
> >   		retval = PTR_ERR(p->mempolicy);
> >   		p->mempolicy = NULL;
> > - 		goto bad_fork_cleanup_cpuset;
> > + 		goto bad_fork_cleanup_delays_binfmt;
> >   	}
> >  	mpol_fix_fork_child_flag(p);
> >  #endif
> >  #ifdef CONFIG_TRACE_IRQFLAGS
> >  	p->irq_events = 0;
> > @@ -1280,13 +1278,11 @@ bad_fork_cleanup_files:
> >  bad_fork_cleanup_security:
> >  	security_task_free(p);
> >  bad_fork_cleanup_policy:
> >  #ifdef CONFIG_NUMA
> >  	mpol_free(p->mempolicy);
> > -bad_fork_cleanup_cpuset:
> >  #endif
> > -	cpuset_exit(p);
> >  bad_fork_cleanup_delays_binfmt:
> 
> 
> The above code, before your change, had the affect that if mpol_copy()
> failed, then the cpusets that were just setup by the cpuset_fork()
> call were undone by a cpuset_exit() call.
> 
> >From what I can tell, after your change, this is no longer done,
> and a failed mpol_copy will leave cpusets in an incorrect state.
> 
> Am I missing something?
> 

If you look in the first patch there's a corresponding
notify_task_watchers(WATCH_TASK_FREE, tsk) below when we get a failure
from INIT. That in turn calls cpuset_exit() because a cpuset_exit()
because a hunk of this patch marks it for execution whenever a task is
freed.

Cheers,
	-Matt Helsley


  reply	other threads:[~2006-09-29  7:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29  2:02 [RFC][PATCH 00/10] Task watchers v2 Introduction Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 01/10] Task watchers v2 Task watchers v2 Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 02/10] Task watchers v2 Benchmark Matt Helsley
2006-09-29  2:32   ` [Lse-tech] " Paul Jackson
2006-09-29 19:38     ` Matt Helsley
2006-09-29 20:13       ` Paul Jackson
2006-09-30  0:01         ` Matt Helsley
2006-09-30  0:04           ` Paul Jackson
2006-09-29  2:02 ` [RFC][PATCH 03/10] Task watchers v2 Register audit task watcher Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 04/10] Task watchers v2 Register semundo " Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 05/10] Task watchers v2 Register cpuset " Matt Helsley
2006-09-29  2:31   ` Paul Jackson
2006-09-29  7:52     ` Matt Helsley [this message]
2006-09-29  8:03       ` [Lse-tech] " Paul Jackson
2006-09-29  2:02 ` [RFC][PATCH 06/10] Task watchers v2 Register NUMA mempolicy " Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 07/10] Task watchers v2 Register IRQ flag tracing " Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 08/10] Task watchers v2 Register lockdep " Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 09/10] Task watchers v2 Register process keyrings " Matt Helsley
2006-09-29  2:02 ` [RFC][PATCH 10/10] Task watchers v2 Register process events connector Matt Helsley
2006-09-29  2:41 ` [RFC][PATCH 00/10] Task watchers v2 Introduction Paul Jackson
2006-09-29  8:16   ` [RFC][PATCH] Task watchers and modules (WAS Re: [RFC][PATCH 00/10] Task watchers v2 Introduction) Matt Helsley
2006-09-29 16:22   ` [RFC][PATCH 00/10] Task watchers v2 Introduction Paul Menage

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=1159516338.3286.10.camel@localhost.localdomain \
    --to=matthltc@us.ibm.com \
    --cc=hch@lst.de \
    --cc=jes@sgi.com \
    --cc=jtk@us.ibm.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=pj@sgi.com \
    --cc=sekharan@us.ibm.com \
    --cc=sgrubb@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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