Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460727 > unrolled thread

Re: [PATCH v14 04/14] task_isolation: add initial support

Started byFrederic Weisbecker <fweisbec@gmail.com>
First post2016-08-11 20:20 +0200
Last post2016-08-11 21:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v14 04/14] task_isolation: add initial support Frederic Weisbecker <fweisbec@gmail.com> - 2016-08-11 20:20 +0200
    Re: [PATCH v14 04/14] task_isolation: add initial support Christoph Lameter <cl@linux.com> - 2016-08-11 21:00 +0200

#1460727 — Re: [PATCH v14 04/14] task_isolation: add initial support

FromFrederic Weisbecker <fweisbec@gmail.com>
Date2016-08-11 20:20 +0200
SubjectRe: [PATCH v14 04/14] task_isolation: add initial support
Message-ID<s52Ke-7mc-5@gated-at.bofh.it>
On Tue, Aug 09, 2016 at 04:29:46PM -0400, Chris Metcalf wrote:
> +/*
> + * Each time we try to prepare for return to userspace in a process
> + * with task isolation enabled, we run this code to quiesce whatever
> + * subsystems we can readily quiesce to avoid later interrupts.
> + */
> +void task_isolation_enter(void)
> +{
> +	WARN_ON_ONCE(irqs_disabled());
> +
> +	/* Drain the pagevecs to avoid unnecessary IPI flushes later. */
> +	lru_add_drain();
> +
> +	/* Quieten the vmstat worker so it won't interrupt us. */
> +	quiet_vmstat_sync();

So, this is going to be called everytime we resume to userspace
while in task isolation mode, right?

Do we need to quiesce vmstat everytime before entering userspace?
I thought that vmstat only need to be offlined once and for all?

And how about lru?

> +
> +	/*
> +	 * Request rescheduling unless we are in full dynticks mode.
> +	 * We would eventually get pre-empted without this, and if
> +	 * there's another task waiting, it would run; but by
> +	 * explicitly requesting the reschedule, we may reduce the
> +	 * latency.  We could directly call schedule() here as well,
> +	 * but since our caller is the standard place where schedule()
> +	 * is called, we defer to the caller.
> +	 *
> +	 * A more substantive approach here would be to use a struct
> +	 * completion here explicitly, and complete it when we shut
> +	 * down dynticks, but since we presumably have nothing better
> +	 * to do on this core anyway, just spinning seems plausible.
> +	 */
> +	if (!tick_nohz_tick_stopped())
> +		set_tsk_need_resched(current);

Again, that won't help :-)

[toc] | [next] | [standalone]


#1460740

FromChristoph Lameter <cl@linux.com>
Date2016-08-11 21:00 +0200
Message-ID<s53mW-7AB-5@gated-at.bofh.it>
In reply to#1460727
On Thu, 11 Aug 2016, Frederic Weisbecker wrote:

> Do we need to quiesce vmstat everytime before entering userspace?
> I thought that vmstat only need to be offlined once and for all?

Once is sufficient after disabling the tick.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web