Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

From: Ingo Molnar
Date: Mon Mar 12 2018 - 03:53:18 EST



* linxiulei@xxxxxxxxx <linxiulei@xxxxxxxxx> wrote:

> /*
> * Because cgroup events are always per-cpu events,
> * this will always be called from the right CPU.
> */

> + /*
> + * if only the cgroup is running on this cpu
> + * and cpuctx->cgrp == NULL (otherwise it would've
> + * been set with running cgroup), we put this cgroup
> + * into cpu context. Or it would case mismatch in
> + * following cgroup events at event_filter_match()
> + */

Beyond making sure that what you comment on makes sense, please also follow
existing comment style, which I quoted above.

There's 3 separate mistakes in that paragraph alone.

Thanks,

Ingo