All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: linux-kernel@vger.kernel.org, Nitesh Lal <nilal@redhat.com>,
	Nicolas Saenz Julienne <nsaenzju@redhat.com>,
	Christoph Lameter <cl@linux.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Alex Belits <abelits@belits.com>, Peter Xu <peterx@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [patch v8 01/10] add basic task isolation prctl interface
Date: Wed, 26 Jan 2022 15:03:45 -0300	[thread overview]
Message-ID: <YfGNAXOpwTfKH01L@fuller.cnet> (raw)
In-Reply-To: <20220120174301.GA213170@lothringen>

On Thu, Jan 20, 2022 at 06:43:01PM +0100, Frederic Weisbecker wrote:
> On Wed, Dec 08, 2021 at 01:09:07PM -0300, Marcelo Tosatti wrote:
> > +int __copy_task_isolation(struct task_struct *tsk)
> > +{
> > +	struct isol_info *info, *new_info;
> > +
> > +	info = current->isol_info;
> > +	if (!(info->inherit_mask & (ISOL_INHERIT_CONF|ISOL_INHERIT_ACTIVE)))
> > +		return 0;
> > +
> > +	new_info = tsk_isol_alloc_context();
> > +	if (IS_ERR(new_info))
> > +		return PTR_ERR(new_info);
> > +
> > +	new_info->inherit_mask = info->inherit_mask;
> 
> Ok then it might be worth mentioning in the docs that the inheritance
> propagates to all the descendants and not just the immediate children,
> unless the inheritance is explicitly reconfigured by some children of course.

v9 has:

**PR_ISOL_CFG_SET**:

        Set task isolation configuration.
        The general format is::

                prctl(PR_ISOL_CFG_SET, what, arg3, arg4, arg5);		

	...

                - Bit ISOL_INHERIT_ACTIVE: Inherit task isolation activation
                  (requires ISOL_INHERIT_CONF to be set). The new task
                  should behave, after fork/clone, in the same manner
                  as the parent task after it executed:

                        prctl(PR_ISOL_ACTIVATE_SET, &mask, ...);

                Note: the inheritance propagates to all the descendants and not
                just the immediate children, unless the inheritance is explicitly
                reconfigured by some children.

> 
> > +
> > +	if (info->inherit_mask & ISOL_INHERIT_CONF) {
> > +		new_info->quiesce_mask = info->quiesce_mask;
> 
> Looks like if the parent has oneshot quiesce features configured, those
> will be inherited as non-oneshot.

Good catch. v9 has:

+       if (info->inherit_mask & ISOL_INHERIT_CONF) {
+               new_info->quiesce_mask = info->quiesce_mask;
+               new_info->conf_mask = info->conf_mask;
+               new_info->oneshot_mask = info->oneshot_mask;
+       }

> 
> > +		new_info->conf_mask = info->conf_mask;
> > +	}
> > +
> > +	if (info->inherit_mask & ISOL_INHERIT_ACTIVE)
> > +		new_info->active_mask = info->active_mask;
> > +
> > +	tsk->isol_info = new_info;
> > +
> > +	return 0;
> > +}
> 
> Other than that:
> 
> Acked-by: Frederic Weisbecker <frederic@kernel.org>

OK, with the fixes above, i'll add your Acked-by to patches 1 and 2.
Let me know otherwise.


      reply	other threads:[~2022-01-26 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 16:09 [patch v8 01/10] add basic task isolation prctl interface Marcelo Tosatti
2022-01-20 17:43 ` Frederic Weisbecker
2022-01-26 18:03   ` Marcelo Tosatti [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=YfGNAXOpwTfKH01L@fuller.cnet \
    --to=mtosatti@redhat.com \
    --cc=abelits@belits.com \
    --cc=bristot@redhat.com \
    --cc=cl@linux.com \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nilal@redhat.com \
    --cc=nsaenzju@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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.