Re: New Figure 3.13 is too tall in -eb size builds
"Paul E. McKenney" <[email protected]> Wed, 28 Aug 2024 07:49:39 -0700
| Newsgroups | org.kernel.vger.perfbook |
|---|---|
| Message-ID | <e74fab26-b30f-4187-9117-4d16c11e94cf@paulmck-laptop> |
On Tue, Aug 27, 2024 at 08:49:23AM -0700, Paul E. McKenney wrote:
> On Wed, Aug 28, 2024 at 12:37:18AM +0900, Akira Yokosawa wrote:
> > On Tue, 27 Aug 2024 04:02:32 -0700, Paul E. McKenney wrote:
> > > On Tue, Aug 27, 2024 at 01:50:56PM +0900, Akira Yokosawa wrote:
> > >> Hi Paul,
> > >>
> > >> Leo's latest CI build of perfbook-eb.pdf failed as you can see at:
> > >>
> > >> https://gitlab.com/linux-kernel/perfbook/-/jobs/7668105673
> > >>
> > >> This is because the new Figure 3.13, or cpu/SimpleWrite.svg, is
> > >> optimized for -2c builds and too tall for -eb size.
> > >
> > > Guilty to charges as read! ;-)
> > >
> > > And thank you for checking!!!
> > >
> > >> A quick fix would be to shrink the figure for -eb builds,
> > >> but that would result in a small diagram hard to read.
> > >
> > > Agreed.
> > >
> > >> Also, the new figure is not yet mentioned in the text.
> > >>
> > >> Furthermore, the corresponding enum list talks about
> > >> CPU 0 doing a store, whose cache line is transferred from
> > >> CPU 7's cache, while the figure presents a cache line transfer
> > >> between CPU 1 and CPU 6.
> > >>
> > >> My guess is you are planning to adjust either of the list or the
> > >> figure.
> > >
> > > You got it! I have pen-on-paper adjustments to the list, and to the
> > > rest of the chapter. I will get that done by the end of this weekend
> > > at the latest. And in a few minutes, I will be going to the gym with a
> > > printout of Chapter 5 ("Counting") to review it, for updates, but mostly
> > > to prepare for an upcoming talk at Kernel Recipes on counting.
> > >
> > >> Tweaking the width of the figure can wait a while. I suppose.
> > >
> > > How much shorter do I need to make it? If a 20% reduction suffices
> > > (which looks to be the case over here), I can simply reduce the amount
> > > of space between rows. If 30% is needed, I could reduce that space
> > > further and shade alternating rows, like we currently do for some tables.
> > > If more than that is needed, I could do a full-page-width figure with the
> > > first half of the rows on the left and the remaining rows on the right.
> > > Or split it into two figures, perhaps doing so only for -eb builds.
> > >
> >
> > So, current version of the SVG has this dimension:
> >
> > > width="382.58057mm"
> > > height="819.60443mm"
> > > viewBox="0 0 382.58057 819.60443"
> >
> > If you stick with the width of "3in" in the \resizebox, reducing the
> > height to less than "706.00mm" should make it fit in -eb builds.
>
> Thank you! So if I stick with the current width, I need a 16%
> reduction in height. Eminently doable.
>
> > If you are thinking of changing the width as well, you need some
> > math to keep the aspect ratio. :-)
>
> Indeed, if I reduce the width, then I must further reduce the height by
> the same fraction.
>
> > > For -2c builds, I am considering doing a 10-20% reduction in the space
> > > between the blocks for the two CPUs, which would make the text easier
> > > to read. Maybe also embolden the fonts.
> > >
> > > Or is there a better way to adjust this figure, for -eb as well as for
> > > other builds?
> >
> > I don't see the need of having multiple versions of the figure.
> > There has been no figure which needs such special tweaks so far.
> > An example of tall one is Figure 9.14, which looks reasonable in
> > -eb builds.
>
> Very good!
>
> > Hope this helps, Akira
>
> It does, and again, thank you!
I added a grey rectangle to connect the two CPUs, which allowed me to
halve the space between each row. I also narrowed the gap between the
CPUs a bit. For me, the result is more readable in 2c mode and also
builds eb without complaint.
How does it look for you?
Thanx, Paul