From: Zhang Yanfei Subject: Re: [PATCH v8 1/2] x86/kexec: add a new atomic notifier list for kdump Date: Tue, 27 Nov 2012 09:53:32 +0800 Message-ID: <50B41D1C.1010802@cn.fujitsu.com> References: <50ADE0C2.1000106@cn.fujitsu.com> <50ADE11A.401@cn.fujitsu.com> <87ip8sxuyh.fsf@xmission.com> <20121126172054.GF12969@redhat.com> <87fw3wuuoh.fsf@xmission.com> <20121126175327.GG12969@redhat.com> <87mwy4teh8.fsf@xmission.com> <50B41849.9040103@cn.fujitsu.com> <87haobolvw.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Gleb Natapov , "x86@kernel.org" , "kexec@lists.infradead.org" , Marcelo Tosatti , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" To: "Eric W. Biederman" Return-path: In-Reply-To: <87haobolvw.fsf@xmission.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org =D3=DA 2012=C4=EA11=D4=C227=C8=D5 09:49, Eric W. Biederman =D0=B4=B5=C0= : > Zhang Yanfei writes: >=20 >> So in summary, >> >> 1. a specific callback function instead of a notifier? >=20 > Yes. >=20 >> 2. Instead of calling vmclear_local_loaded_vmcss, the vmclear operat= ion >> will just call the vmclear on every vmcss loaded on the cpu? >> >> like below: >> >> static void crash_vmclear_local_loaded_vmcss(void) >> { >> int cpu =3D raw_smp_processor_id(); >> struct loaded_vmcs *v, *n; >> >> if (!crash_local_vmclear_enabled(cpu)) >> return; >> >> list_for_each_entry_safe(v, n, &per_cpu(loaded_vmcss_on_cpu,= cpu), >> loaded_vmcss_on_cpu_link) >> vmcs_clear(v->vmcs); >> } >> >> right? >=20 > Yeah that looks good. I would do list_for_each_entry because the lis= t > isn't changing. OK. I will update the patch and resend it. Zhang