Coiby Xu coxu@redhat.com 于2022年4月25日周一 11:10写道:
On Sat, Apr 23, 2022 at 10:32:28PM +0800, Kairui Song wrote:
Coiby Xu coxu@redhat.com 于2022年4月2日周六 11:24写道:
[...]
This patch set reuses NetworkManager connection profiles to set up kdump network. It also reduces the memory consumption of network drivers and fix other issues at the same time. Here are the bug list that addressed by this patch set on bugzilla,
- Bug 1962421 - [RHEL-9]"eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth0': File exists"
- Bug 2064708 - kdump: mkdumprd: failed to make kdump initrd for bridge network on z15 z/vm - bugs related to OOM caused by network driver
Hi Coiby,
Hi Kairui,
Glad to see you again:)
This looks great, but one thing I don't understand, how is this going to help reduce the memory consumption? Shoudn't network drivers be the same, no matter how they are loaded?
I forgot to temporarily remove Bug 1958587 from the list which may confuse you. Currently this version only saves memory for the case where a network driver manages multiple NICs in [RFC 04/13] don't let NetworkManager manage unneeded network interfaces. Because when NetworkManager manges a NIC, it will trigger the driver to allocate memory resources (for rx or tx ring buffers for example) regardless of the NIC is active or not. By asking NM to stopping managing these unneeded devices, it could save kdump memory. I planned to use dracut's "--hostonly-nics" introduced by you to get rid of unnecessary NIC drivers in this version as well but currently it's in the dracut kdump module we find out the NICs needed by kdump and as a dracut module it can't add the "--hostonly-nics" option to dracut. So I created a dracut PR [1] to allow specifying empty --hostonly-nics. In next version I'll only install the network drivers needed as [1] has been merged.
Ah, I get it now. I was thinking about how should kexec-tools determine which interface to kept when implementing that --hostonly-nic, this patch is a clean and great answer, thanks!