Skip to contentSkip to conversation

New Figure 3.13 is too tall in -eb size builds

DISCUSSION Akira Yokosawa 2 participants 7 messages Aug 27, 2024 – Aug 28, 2024

lore
Share & tools
lore
#0 lore raw

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.

A quick fix would be to shrink the figure for -eb builds, but that would result in a small diagram hard to read.

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.

Tweaking the width of the figure can wait a while. I suppose.

Thanks, Akira

#1 lore raw
Quoted 8 lines · Akira Yokosawa

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!!!

Quoted 2 lines

A quick fix would be to shrink the figure for -eb builds, but that would result in a small diagram hard to read.

Agreed.

Quoted 9 lines

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.

Quoted 1 line

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.

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?

Thanx, Paul

#2 lore raw
Quoted 37 lines · Paul E. McKenney
Quoted 8 lines · Akira Yokosawa

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!!!

Quoted 2 lines

A quick fix would be to shrink the figure for -eb builds, but that would result in a small diagram hard to read.

Agreed.

Quoted 9 lines

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.

Quoted 1 line

Tweaking the width of the figure can wait a while. I suppose.

Quoted 8 lines

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:

Quoted 3 lines
   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.

If you are thinking of changing the width as well, you need some math to keep the aspect ratio. :-)

Quoted 6 lines

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.

Hope this helps, Akira

Quoted 2 lines

Thanx, Paul

#3 lore raw
Quoted 47 lines · Akira Yokosawa
Quoted 37 lines · Paul E. McKenney
Quoted 8 lines · Akira Yokosawa

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!!!

Quoted 2 lines

A quick fix would be to shrink the figure for -eb builds, but that would result in a small diagram hard to read.

Agreed.

Quoted 9 lines

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.

Quoted 1 line

Tweaking the width of the figure can wait a while. I suppose.

Quoted 8 lines

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.

Quoted 8 lines

So, current version of the SVG has this dimension:

Quoted 3 lines
   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.

Quoted 2 lines

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.

Quoted 11 lines
Quoted 6 lines

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!

Quoted 1 line

Hope this helps, Akira

It does, and again, thank you!

Thanx, Paul

#4 lore raw
Quoted 78 lines · Paul E. McKenney
Quoted 47 lines · Akira Yokosawa
Quoted 37 lines · Paul E. McKenney
Quoted 8 lines · Akira Yokosawa

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!!!

Quoted 2 lines

A quick fix would be to shrink the figure for -eb builds, but that would result in a small diagram hard to read.

Agreed.

Quoted 9 lines

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.

Quoted 1 line

Tweaking the width of the figure can wait a while. I suppose.

Quoted 8 lines

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.

Quoted 8 lines

So, current version of the SVG has this dimension:

Quoted 3 lines
   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.

Quoted 2 lines

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.

Quoted 11 lines
Quoted 6 lines

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.

Quoted 5 lines

Very good!

Quoted 1 line

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

#5 lore raw

On Wed, 28 Aug 2024 07:49:39 -0700, Paul E. McKenney wrote:
[...]

Quoted 6 lines

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?

Mostly looks good to me.

I see a vertical line on the right side of the grey zone. Having another one on the left would make the figure look more symmetrical, wouldn't it?

Thanks, Akira

Quoted 3 lines

Thanx, Paul

#6 lore raw
Quoted 7 lines · Akira Yokosawa

On Wed, 28 Aug 2024 07:49:39 -0700, Paul E. McKenney wrote:
[...]

Quoted 5 lines

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.

Quoted 7 lines
Quoted 1 line

How does it look for you?

Mostly looks good to me.

I see a vertical line on the right side of the grey zone. Having another one on the left would make the figure look more symmetrical, wouldn't it?

That would be because I forgot to remove the construction line that I used to line up the right-hand boxes. This is an old habit from back in the days when I used a real drafting board with real pencils and a real T-square. ;-)

Good catch, thank you, and I will remove it.

Thanx, Paul