Merge ~kajiya/+git/gce-compute-image-packages:ubuntu/focal-update-to-20240307.00 into ~ubuntu-core-dev/+git/gce-compute-image-packages:ubuntu/focal

Proposed by Chloé Smith
Status: Merged
Merged at revision: 21a4053e35d3ae16dc2b676617d36ee473ba75f7
Proposed branch: ~kajiya/+git/gce-compute-image-packages:ubuntu/focal-update-to-20240307.00
Merge into: ~ubuntu-core-dev/+git/gce-compute-image-packages:ubuntu/focal
Diff against target: 192 lines (+67/-21)
5 files modified
OWNERS (+5/-2)
debian/changelog (+23/-0)
src/lib/udev/google_nvme_id (+1/-1)
src/usr/bin/google_set_hostname (+2/-1)
src/usr/bin/google_set_multiqueue (+36/-17)
Reviewer Review Type Date Requested Status
Utkarsh Gupta Approve
Review via email: mp+466399@code.launchpad.net

Commit message

Update upstream source from tag 'upstream/20240307.00' (LP: #2066314)

To post a comment you must log in.
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Thanks, this looks good. I've adjusted the d/ch a bit and sponsored your upload:

$ dput ubuntu ../gce-compute-image-packages_20240307.00-0ubuntu1\~20.04.0_source.changes
Uploading gce-compute-image-packages using ftp to ubuntu (host: upload.ubuntu.com; directory: /ubuntu)
running supported-distribution: check whether the target distribution is currently supported (using distro-info)
{'allowed': ['release', 'proposed', 'backports', 'security'], 'known': ['release', 'proposed', 'updates', 'backports', 'security']}
running required-fields: check whether a field is present and non-empty in the changes file
running checksum: verify checksums before uploading
running suite-mismatch: check the target distribution for common errors
running check-debs: makes sure the upload contains a binary package
running gpg: check GnuPG signatures before the upload
Uploading gce-compute-image-packages_20240307.00-0ubuntu1~20.04.0.dsc
Uploading gce-compute-image-packages_20240307.00.orig.tar.xz
Uploading gce-compute-image-packages_20240307.00-0ubuntu1~20.04.0.debian.tar.xz
Uploading gce-compute-image-packages_20240307.00-0ubuntu1~20.04.0_source.buildinfo
Uploading gce-compute-image-packages_20240307.00-0ubuntu1~20.04.0_source.changes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/OWNERS b/OWNERS
index 80fc96d..59fca61 100644
--- a/OWNERS
+++ b/OWNERS
@@ -2,12 +2,15 @@
2# See the OWNERS docs at https://go.k8s.io/owners2# See the OWNERS docs at https://go.k8s.io/owners
33
4approvers:4approvers:
5 - a-crate
6 - ajorg
5 - bkatyl7 - bkatyl
6 - chaitanyakulkarni288 - chaitanyakulkarni28
7 - dorileo9 - dorileo
10 - drewhli
11 - elicriffield
12 - gaughen
8 - jjerger13 - jjerger
9 - karnvadaliya14 - karnvadaliya
10 - koln6715 - koln67
11 - quintonamore
12 - vorakl
13 - zmarano16 - zmarano
diff --git a/debian/changelog b/debian/changelog
index 0c2b84e..401eca1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
1gce-compute-image-packages (20240307.00-0ubuntu1~20.04.0) focal; urgency=medium
2
3 * Rebuild for Focal Fossa (LP: #2066314)
4
5 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Thu, 23 May 2024 11:56:07 +0100
6
7gce-compute-image-packages (20240307.00-0ubuntu1) oracular; urgency=medium
8
9 * New upstream version 20240307.00. (LP: #2066314)
10
11 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Tue, 21 May 2024 14:03:23 +0100
12
1gce-compute-image-packages (20230808.00-0ubuntu1~20.04.1) focal; urgency=medium13gce-compute-image-packages (20230808.00-0ubuntu1~20.04.1) focal; urgency=medium
2 14
3 * debian/99-gce.rules:15 * debian/99-gce.rules:
@@ -15,6 +27,17 @@ gce-compute-image-packages (20230808.00-0ubuntu1~20.04.0) focal; urgency=medium
1527
16 -- Utkarsh Gupta <utkarsh@ubuntu.com> Tue, 12 Sep 2023 14:58:06 +053028 -- Utkarsh Gupta <utkarsh@ubuntu.com> Tue, 12 Sep 2023 14:58:06 +0530
1729
30gce-compute-image-packages (20230808.00-0ubuntu2) noble; urgency=medium
31
32 * debian/99-gce.rules:
33 * The previous rule forced an I/O scheduler on all disk types. This
34 has now been re-scoped to only affect HDDs.
35 * The I/O scheduler has also been changed from "NOOP" to "NONE"
36 which performed much better in testing.
37 * LP: #2045708.
38
39 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Mon, 16 Oct 2023 22:59:06 +0100
40
18gce-compute-image-packages (20230808.00-0ubuntu1) mantic; urgency=medium41gce-compute-image-packages (20230808.00-0ubuntu1) mantic; urgency=medium
1942
20 * New upstream version 20230808.00. (LP: #2033061)43 * New upstream version 20230808.00. (LP: #2033061)
diff --git a/src/lib/udev/google_nvme_id b/src/lib/udev/google_nvme_id
index ef02963..f0bba67 100755
--- a/src/lib/udev/google_nvme_id
+++ b/src/lib/udev/google_nvme_id
@@ -69,7 +69,7 @@ function get_namespace_device_name() {
69 fi69 fi
7070
71 local device_name71 local device_name
72 device_name="$(echo "$nvme_json" | grep device_name | sed -e 's/.*"device_name":[ \t]*"\([a-zA-Z0-9_-]\+\)".*/\1/')"72 device_name="$(echo "$nvme_json" | grep device_name | sed -e 's/.*"device_name":[ \t]*"\([.a-zA-Z0-9_-]\+\)".*/\1/')"
7373
74 # Error if our device name is empty74 # Error if our device name is empty
75 if [[ -z "$device_name" ]]; then75 if [[ -z "$device_name" ]]; then
diff --git a/src/usr/bin/google_set_hostname b/src/usr/bin/google_set_hostname
index 317768f..05a0412 100755
--- a/src/usr/bin/google_set_hostname
+++ b/src/usr/bin/google_set_hostname
@@ -62,7 +62,8 @@ if [ -n "$new_host_name" ] && [ "${new_host_name%%.*}" != "$old_hostname" ] && !
62 # Restart rsyslog to update the hostname.62 # Restart rsyslog to update the hostname.
63 systemctl=$(which systemctl 2> /dev/null)63 systemctl=$(which systemctl 2> /dev/null)
64 if [ -x "$systemctl" ]; then64 if [ -x "$systemctl" ]; then
65 hasrsyslog=$($systemctl | grep rsyslog | cut -f1 -d' ')65 # See man 5 systemd.unit for systemd unit naming rules
66 hasrsyslog=$($systemctl | grep rsyslog | grep -oE '[a-zA-Z0-9:-_.\]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)')
66 if [ ! -z "$hasrsyslog" ]; then67 if [ ! -z "$hasrsyslog" ]; then
67 $systemctl -q --no-block restart "$hasrsyslog"68 $systemctl -q --no-block restart "$hasrsyslog"
68 fi69 fi
diff --git a/src/usr/bin/google_set_multiqueue b/src/usr/bin/google_set_multiqueue
index fa87a1e..8e51934 100755
--- a/src/usr/bin/google_set_multiqueue
+++ b/src/usr/bin/google_set_multiqueue
@@ -45,7 +45,7 @@ function set_channels() {
4545
46function set_irq_range() {46function set_irq_range() {
47 local -r nic="$1"47 local -r nic="$1"
48 local core="$2"48 local bind_cores_begin="$2"
4949
50 # The user may not have this $nic configured on their VM, if not, just skip50 # The user may not have this $nic configured on their VM, if not, just skip
51 # it, no need to error out.51 # it, no need to error out.
@@ -53,16 +53,26 @@ function set_irq_range() {
53 return;53 return;
54 fi54 fi
5555
56
56 # We count the number of rx queues and assume number of rx queues == tx57 # We count the number of rx queues and assume number of rx queues == tx
57 # queues. Currently the GVE configuration at boot is 16 rx + 16 tx.58 # queues. The number of queues shown in the sysfs stands for the initial
59 # queues while the number of IRQs stands for the max queues. The number of
60 # initial queues should be always less than or equal to that of the max
61 # queues.
62 core=$bind_cores_begin
63 num_irqs=$(( $(ls /sys/class/net/"$nic"/device/msi_irqs | wc -l) / 2 ))
58 num_q=$(ls -1 /sys/class/net/"$nic"/queues/ | grep rx | wc -l)64 num_q=$(ls -1 /sys/class/net/"$nic"/queues/ | grep rx | wc -l)
5965
60 echo "Setting irq binding for "$nic" to core [$core - $((core + num_q - 1))] ..."66 echo "Setting irq binding for "$nic" to core [$core - $((core + num_q - 1))] ..."
6167
62 irqs=($(ls /sys/class/net/"$nic"/device/msi_irqs | sort -g))68 irqs=($(ls /sys/class/net/"$nic"/device/msi_irqs | sort -g))
63 for ((queue = 0; queue < "$num_q"; queue++)); do69 for ((irq = 0; irq < "$num_irqs"; irq++)); do
64 tx_irq=${irqs[$queue]}70 tx_irq=${irqs[$irq]}
65 rx_irq=${irqs[$((queue + num_q))]}71 rx_irq=${irqs[$((irq + num_irqs))]}
72
73 # Only allocate $num_q cores to the IRQs and queues. If the number of IRQs
74 # is more than that of queues, the CPUs will be wrapped around.
75 core=$(( bind_cores_begin + irq % num_q ))
6676
67 # this is GVE's TX irq. See gve_tx_idx_to_ntfy().77 # this is GVE's TX irq. See gve_tx_idx_to_ntfy().
68 echo "$core" > /proc/irq/"$tx_irq"/smp_affinity_list78 echo "$core" > /proc/irq/"$tx_irq"/smp_affinity_list
@@ -70,23 +80,32 @@ function set_irq_range() {
70 # this is GVE's RX irq. See gve_rx_idx_to_ntfy().80 # this is GVE's RX irq. See gve_rx_idx_to_ntfy().
71 echo "$core" > /proc/irq/"$rx_irq"/smp_affinity_list81 echo "$core" > /proc/irq/"$rx_irq"/smp_affinity_list
7282
73 # XPS (Transmit Packet Steering) allows a core to decide which queue to83 # Check if the queue exists at present because the number of IRQs equals
74 # select if its mask is found in one of the queue's xps_cpus84 # the max number of queues allocated and could be greater than the current
75 cp /proc/irq/"$tx_irq"/smp_affinity /sys/class/net/"$nic"/queues/tx-"$queue"/xps_cpus85 # number of queues.
7686 tx_queue=/sys/class/net/"$nic"/queues/tx-"$irq"
77 echo -en "$nic:q-$queue: \ttx: irq $tx_irq bind to $core \trx: irq $rx_irq bind to $core"87 if ls $tx_queue 1> /dev/null 2>&1; then
78 echo -e " \txps_cpus bind to $(cat /sys/class/net/"$nic"/queues/tx-"$queue"/xps_cpus)"88 # XPS (Transmit Packet Steering) allows a core to decide which queue to
89 # select if its mask is found in one of the queue's xps_cpus
90 cp /proc/irq/"$tx_irq"/smp_affinity $tx_queue/xps_cpus
91
92 echo -en "$nic:q-$irq: \ttx: irq $tx_irq bind to $core \trx: irq $rx_irq bind to $core"
93 echo -e " \txps_cpus bind to $(cat $tx_queue/xps_cpus)"
94 else
95 echo -e "$nic:q-$irq: \ttx: irq $tx_irq bind to $core \trx: irq $rx_irq bind to $core"
96 fi
7997
80 core=$((core + 1))
81 done98 done
82}99}
83100
84# returns 0 (success) if it's running on a3 platform.101# returns 0 (success) if it's running on a3 or a3plus platform.
85function is_a3_platform() {102function is_a3_platform() {
86 machine_type=$(curl -H "Metadata-Flavor: Google" \103 machine_type=$(curl -m 1 -H "Metadata-Flavor: Google" \
87 http://169.254.169.254/computeMetadata/v1/instance/machine-type)104 http://169.254.169.254/computeMetadata/v1/instance/machine-type)
88105
89 [[ "$machine_type" == *"a3-highgpu-8g"* ]] || return 1106 [[ "$machine_type" == *"a3-highgpu-8g"* \
107 || "$machine_type" == *"a3-ultragpu-8g"* \
108 || "$machine_type" == *"a3-megagpu-8g"* ]] || return 1
90109
91 return 0110 return 0
92}111}
@@ -234,7 +253,7 @@ fi
234253
235# IRQ binding for numa 0, CPUs [0, 51] and [104, 155] are for numa 0.254# IRQ binding for numa 0, CPUs [0, 51] and [104, 155] are for numa 0.
236numa0_irq_start=1255numa0_irq_start=1
237find /sys/class/net -type l | xargs -L 1 realpath | sort | xargs -L 1 basename | grep -v lo | while read nic_name; do256find /sys/class/net -type l | xargs -L 1 realpath | grep '/sys/devices/pci' | sort | xargs -L 1 basename | while read nic_name; do
238 nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)257 nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)
239 if [[ $nic_numa_node -ne 0 ]]; then258 if [[ $nic_numa_node -ne 0 ]]; then
240 continue259 continue
@@ -256,7 +275,7 @@ done
256275
257# IRQ binding for numa 1, CPUs [52, 103] and [156, 207] are for numa 1.276# IRQ binding for numa 1, CPUs [52, 103] and [156, 207] are for numa 1.
258numa1_irq_start=52277numa1_irq_start=52
259find /sys/class/net -type l | xargs -L 1 realpath | sort | xargs -L 1 basename | grep -v lo | while read nic_name; do278find /sys/class/net -type l | xargs -L 1 realpath | grep '/sys/devices/pci' | sort | xargs -L 1 basename | while read nic_name; do
260 nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)279 nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)
261 if [[ $nic_numa_node -ne 1 ]]; then280 if [[ $nic_numa_node -ne 1 ]]; then
262 continue281 continue

Subscribers

People subscribed via source and target branches