Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1442446
| Path | csiph.com!goblin3!goblin.stu.neva.ru!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thomas Gleixner <tglx@linutronix.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 24/32] Task fork and exit for rdtgroup |
| Date | Wed, 13 Jul 2016 15:20:01 +0200 |
| Message-ID | <rUseZ-3yv-7@gated-at.bofh.it> (permalink) |
| References | <rUe2l-2xx-3@gated-at.bofh.it> <rUe2n-2xx-43@gated-at.bofh.it> |
| X-Original-To | Fenghua Yu <fenghua.yu@intel.com> |
| User-Agent | Alpine 2.11 (DEB 23 2013-08-11) |
| MIME-Version | 1.0 |
| Content-Type | TEXT/PLAIN; charset=US-ASCII |
| X-Linutronix-Spam-Score | -1.0 |
| X-Linutronix-Spam-Level | - |
| X-Linutronix-Spam-Status | No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 51 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <h.peter.anvin@intel.com>, Tony Luck <tony.luck@intel.com>, Tejun Heo <tj@kernel.org>, Borislav Petkov <bp@suse.de>, Stephane Eranian <eranian@google.com>, Peter Zijlstra <peterz@infradead.org>, Marcelo Tosatti <mtosatti@redhat.com>, David Carrillo-Cisneros <davidcc@google.com>, Ravi V Shankar <ravi.v.shankar@intel.com>, Vikas Shivappa <vikas.shivappa@linux.intel.com>, Sai Prakhya <sai.praneeth.prakhya@intel.com>, linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org> |
| X-Original-Date | Wed, 13 Jul 2016 15:14:31 +0200 (CEST) |
| X-Original-Message-ID | <alpine.DEB.2.11.1607131508160.4083@nanos> |
| X-Original-References | <1468371785-53231-1-git-send-email-fenghua.yu@intel.com> <1468371785-53231-25-git-send-email-fenghua.yu@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1442446 |
Show key headers only | View raw
On Tue, 12 Jul 2016, Fenghua Yu wrote:
> +void rdtgroup_fork(struct task_struct *child)
> +{
> + INIT_LIST_HEAD(&child->rg_list);
> + child->rdtgroup = NULL;
> +}
> +
> +void rdtgroup_post_fork(struct task_struct *child)
> +{
> + if (!use_rdtgroup_tasks)
> + return;
> +
> + spin_lock_irq(&rdtgroup_task_lock);
> + if (list_empty(&child->rg_list)) {
Why would the list be non empty after a fork?
> + struct rdtgroup *rdtgrp = current->rdtgroup;
> +
> + list_add_tail(&child->rg_list, &rdtgrp->pset.tasks);
> + child->rdtgroup = rdtgrp;
> + atomic_inc(&rdtgrp->pset.refcount);
> + }
> + spin_unlock_irq(&rdtgroup_task_lock);
> +}
> diff --git a/kernel/exit.c b/kernel/exit.c
> index 9e6e135..04346b6 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -59,6 +59,7 @@
> #include <asm/unistd.h>
> #include <asm/pgtable.h>
> #include <asm/mmu_context.h>
> +#include <asm/intel_rdt.h>
>
> static void __unhash_process(struct task_struct *p, bool group_dead)
> {
> @@ -757,6 +758,7 @@ void do_exit(long code)
> perf_event_exit_task(tsk);
>
> cgroup_exit(tsk);
> + rdtgroup_exit(tsk);
-ENOSUCHFUNCTION
Please provide the implementations first and then hook it up not the other way
round.
Thanks,
tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 24/32] Task fork and exit for rdtgroup "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
Re: [PATCH 24/32] Task fork and exit for rdtgroup Thomas Gleixner <tglx@linutronix.de> - 2016-07-13 15:20 +0200
RE: [PATCH 24/32] Task fork and exit for rdtgroup Thomas Gleixner <tglx@linutronix.de> - 2016-07-13 23:10 +0200
RE: [PATCH 24/32] Task fork and exit for rdtgroup "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-13 23:30 +0200
csiph-web