[Pdbg] [PATCH v2 2/2] main: Address by linux CPU number with PPC host backend
Amitay Isaacs
amitay at ozlabs.org
Mon Jul 16 17:06:59 AEST 2018
On Mon, 2018-07-16 at 16:59 +1000, Michael Neuling wrote:
> On Mon, 2018-07-16 at 12:35 +1000, Amitay Isaacs wrote:
> > On Sun, 2018-07-15 at 16:42 +1000, Michael Neuling wrote:
> > > On Fri, 2018-07-13 at 16:34 +1000, Amitay Isaacs wrote:
> > > > On Fri, 2018-07-13 at 16:21 +1000, Michael Neuling wrote:
> > > > > With the PPC host backend used for HTM it's difficult to
> > > > > match up
> > > > > the
> > > > > hardware numbers used pdbg with linux CPU numbers that people
> > > > > want to
> > > > > affinitise a workload against (ie. taskset -c <cpu number>).
> > > > >
> > > > > This adds a new "-l <cpu>" options so users can address the
> > > > > CPU
> > > > > to
> > > > > target using linux CPU numbers. This is only available when
> > > > > using
> > > > > the
> > > > > host backend on POWER machines.
> > > >
> > > > Is -l mutually exlusive with -p?
> > >
> > > Yes, they are mutually exclusive
> > >
> > > > Or you expect "... -p 13 -l 1 ... " to work?
> > >
> > > I would not expect that to work but I don't have an explicit
> > > check
> > > for it right
> > > now. We should probably add something.
> > >
> > > > If they are mutually exclusive, we can just map l_list to
> > > > p_list
> > > > via
> > > > pir_map().
> > >
> > > I think it l_list would need to map to p_list, c_list and
> > > t_list...
> > > not justp_list.
> > >
> > > I end up just doing the mapping from l_list to
> > > thread/chip/processor
> > > sel.
> >
> > I realized that "-l <cpu>" should really be mapping to hardware
> > threads
> > and not just hardware processors.
> >
> > So l_list should be declared as:
> >
> > int l_list[MAX_PROCESSORS * MAX_CHIPS * MAX_THREADS];
>
> Agreed.
>
> > It should enable appropriately selected processors/cores/threads.
>
> Can we also rename MAX_CHIPS to MAX_CORES?
We definily should. However...
There is horrible overloading of chiplet array to address chiplets.
/* This is kinda broken as we're overloading what '-c'
* means - it's now up to each command to select targets
* based on core/chiplet. We really need a better
* solution to target selection. */
pdbg_for_each_target("chiplet", pib, chip) {
We need to figure out a way to target any "chiplet" rather than adding letters of alphabet for each type of chiplet.
Maybe use -p/-c/-t or -l for main targets (processor/chip/thread) and create a different scheme for other chiplets?
Amitay.
--
Sit next to a pretty girl for an hour, it seems like a minute. Sit on a
red-hot stove for a minute, it seems like an hour. That's relativity.
More information about the Pdbg
mailing list