From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web11.32936.1613990393584269901 for ; Mon, 22 Feb 2021 02:39:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OSM751xp; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613990392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oXh4JesR9yYECo7uxZ9a8oo8Vt/hwbHheV0voTYCPZM=; b=OSM751xp5R91ZwxTd5lZrc2xbBiDzwSrPMrw+0PPU9T2y4CwuE2GWWlg7IKS3nZV91/G3+ wJMT4Z9uQWCL2Uik/4g2qmyGTVaYEbQtIBBm1q5iUPiYV4wzk7zGdOt26ATXWCyKZw5wxB bElPdZsvPE1LCw5+IjUYYpoHzJTYnOA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-gG7qE2HRMC-Ev5S0SseRUA-1; Mon, 22 Feb 2021 05:39:51 -0500 X-MC-Unique: gG7qE2HRMC-Ev5S0SseRUA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCE99AFA80; Mon, 22 Feb 2021 10:39:49 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-67.ams2.redhat.com [10.36.113.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B1811346F; Mon, 22 Feb 2021 10:39:48 +0000 (UTC) Subject: Re: [edk2-devel] MP Services Protocol : Support Hyper threading or not To: devel@edk2.groups.io, tigerliu@zhaoxin.com References: <03f9e675800143189bc59fab08865256@zhaoxin.com> From: "Laszlo Ersek" Message-ID: <581d5952-32b2-56e3-30d5-7f7f24039fa0@redhat.com> Date: Mon, 22 Feb 2021 11:39:47 +0100 MIME-Version: 1.0 In-Reply-To: <03f9e675800143189bc59fab08865256@zhaoxin.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/22/21 08:08, Tiger Liu(BJ-RD) wrote: > Dear All: > I have a question about MP Services Protocol. > Does it support Hyper-threading technology? > > For example: > A Quad-cores CPU(with HT feature support), actually it is equal to 8 logical cores. > Take assumption 8 logical cores are all healthy and being enabled. > > So: > > 1. Will EFI_MP_SERVICES_PROTOCOL.GetNumberOfProcessors()return total 8 logical processor cores? > > 2. Will EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() make all 8 logical cores do some tasks simultaneously? My understanding is "yes", to both questions. Most of the MP stuff deals with "logical processors". BTW, if you check the EFI_MP_SERVICES_GET_PROCESSOR_INFO prototype, it outputs EFI_PROCESSOR_INFORMATION. The latter has the following fields: EFI_CPU_PHYSICAL_LOCATION Location; EXTENDED_PROCESSOR_INFORMATION ExtendedInformation; The former gives you a package/core/thread identification for a particular processor number. The latter (optionally) provides a 6-level description (package / module / tile / die / core / thread). In each information structure, "logical thread" is the finest granularity information. hth Laszlo