From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bader Subject: Re: Question about apic ipi interface Date: Tue, 23 Apr 2013 14:48:00 +0200 Message-ID: <51768300.4080307@canonical.com> References: <51765D56.1000906@canonical.com> <51767D4D.40308@canonical.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3782021395884106042==" Return-path: In-Reply-To: <51767D4D.40308@canonical.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ben Guthro Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk , Lin Ming List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============3782021395884106042== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig35AC8CD9FCF1CA249EE070C1" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig35AC8CD9FCF1CA249EE070C1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 23.04.2013 14:23, Stefan Bader wrote: > On 23.04.2013 14:15, Ben Guthro wrote: >> On Tue, Apr 23, 2013 at 11:07 AM, Stefan Bader >> wrote: >>> I was looking at some older patch and there is one thing I do not und= erstand. >>> >>> commit f447d56d36af18c5104ff29dcb1327c0c0ac3634 >>> xen: implement apic ipi interface >>> >>> Specifically there the implementation of xen_send_IPI_mask_allbutself= (). >>> >>> void xen_send_IPI_mask_allbutself(const struct cpumask *mask, >>> int vector) >>> { >>> unsigned cpu; >>> unsigned int this_cpu =3D smp_processor_id(); >>> >>> if (!(num_online_cpus() > 1)) >>> return; >>> >>> for_each_cpu_and(cpu, mask, cpu_online_mask) { >>> if (this_cpu =3D=3D cpu) >>> continue; >>> >>> xen_smp_send_call_function_single_ipi(cpu); >>> } >>> } >>> >>> Why is this using xen_smp_send_call_function_single_ipi()? This dumps= the >>> supplied vector and always uses XEN_CALL_FUNCTION_SINGLE_VECTOR. In c= ontrast the >>> xen_send_IPI_all() and xen_send_IPI_self() keep the (mapped) vector. >>> >>> Mildly wondering about whether call function would need special casin= g (just >>> because xen_smp_send_call_function_ipi() is special). But I don't hav= e the big >>> picture there. >>> >> >> Adding Lin Ming here, since this was an evolution of an incomplete >> implementation of mine that was >> ultimately used in a larger context, outside of my original use case >> for it (kgdb of dom0) that ultimately >> gave me credit for this part of the patch, as part of a larger series.= >> >> I must admit that I don't recall the reasoning, if there was one. >> It may be an oversight. >> >> This was the original (incomplete) patch, in context: >> http://markmail.org/message/d6ca5zfdmiqipurt >> >> >> Are you seeing issues with the code, or just doing code inspection? >=20 > No issues, I was just looking at the patch because we were asked to bac= kport it > to fix another issue (access to the apic IPI functions without checking= whether > there is a pointer). Since things did work in most cases before, maybe = there is > no real usage. :) I was just curious. >=20 > Stefan Oh, and while looking at it... why does arch/x86/xen/smp.h includes a def= inition for physflat_send_IPI_allbutself? (introduced by the same change. If its = not hidden by some hideous macro magic there is only one place that needs it = and that is in the same file (apic_flat_64.c). >=20 >> >> Ben >> >=20 >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >=20 --------------enig35AC8CD9FCF1CA249EE070C1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBCgAGBQJRdoMBAAoJEOhnXe7L7s6jp+AQAMaQQO+N3Nni0FXsTSkOEVQ1 RUkYh/0L0TKT1DjOUXDvAwrERcm8hVOnygkrInxVMaMkwecB3r7Km9G36FOTUdj+ mX/W5QQp8yUwA6vuKLHOuzoHXW/CY27kFGwflDVeEnYf9p0YiBkJNHQ0NSdYG++J LAVfpYRifon/c3ovJNOzr06bpopAN7oRPIrUD1GUSRJdNGlMXQ4n23elPLN5IXrj mA/3Inn2c6qj2nXhRpzsPwjpcSYpHVlbngTbgtu1CGdQYN4IOlpAc9w5ef2fqGI+ 9XJ+v0rYgwhXmYAZs4x3PwpX9mEDIedIH5TQfZGQabLQHIIPLvLnhxraMgxhMnOo 8phhZarwrFk7eoJunIucM6hGBCbmvNDL+QH61FoNBIgG/GyGlz+g+mUCJ20ksNlH Pn2kL4+wRUV/1DM//bIS59e9KFDmKInztPNyPkfdGHWXZMmj5emL0Sbz6tiOSg70 2yqn4KdjwzNu2s2gLv7bAskPaR9Ko2Ezo/zPC7Ssm0VZyVqIDH4KhrpKf/X1dTpc 6xBbqBwbq4RL0zi76uubLXVfYfbAyDCnqGdhUfoow0knSuZhNslDNlyjef0bklL8 aZt00co3opfIiVztvKd/a+oq52q85hBSmVTeZoa605/DxYUOazC5QZ7HYJ9FEXv+ KildyzqJ2IGNqy419JaO =QULu -----END PGP SIGNATURE----- --------------enig35AC8CD9FCF1CA249EE070C1-- --===============3782021395884106042== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3782021395884106042==--