From owner-freebsd-current@FreeBSD.ORG Mon Jan 30 11:08:15 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A1641065670 for ; Mon, 30 Jan 2012 11:08:15 +0000 (UTC) (envelope-from ambrosehua@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D27D98FC19 for ; Mon, 30 Jan 2012 11:08:14 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so4218850wgb.31 for ; Mon, 30 Jan 2012 03:08:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=BXm7cLk5eujK49ml4LhqNSmK9vD5FcVAZDgjgJCqwBY=; b=Cxp6QJ7t4Ker626KvfvfR5ZvmE0QMcrbmMytN8kTLGNcLq8FA11w2nFayTLI6vSAvP 9QteahEsd7/8t4REDAA2UpUT5s0Ny2MNp1N9H0wN5fNQ5ypejBwaeBBY8a7hYW4tkDAj yZgW7jV+9yAduP8eGyr4WeY0fpUhyNUeGMoQQ= MIME-Version: 1.0 Received: by 10.180.96.161 with SMTP id dt1mr27423270wib.13.1327921693666; Mon, 30 Jan 2012 03:08:13 -0800 (PST) Received: by 10.223.42.18 with HTTP; Mon, 30 Jan 2012 03:08:13 -0800 (PST) In-Reply-To: <20120130063607.GV2726@deviant.kiev.zoral.com.ua> References: <20120130063607.GV2726@deviant.kiev.zoral.com.ua> Date: Mon, 30 Jan 2012 19:08:13 +0800 Message-ID: From: Paul Ambrose To: Kostik Belousov Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current Subject: Re: Does anyone try kib's Sandy Bridge PCID patch (pcid.2.patch)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2012 11:08:15 -0000 =D4=DA 2012=C4=EA1=D4=C230=C8=D5 =CF=C2=CE=E72:36=A3=ACKostik Belousov =D0=B4=B5=C0=A3=BA > On Mon, Jan 30, 2012 at 10:15:51AM +0800, Paul Ambrose wrote: >> I have two boxes, one is AMD Athlon 610e 2.4G with FreeBSD-current >> patched with pcid.2.patch? It works well without other issue and it >> seem the pcid patch >> does not affect other part of the kernel. The other one is Sandy > Athlons do not have PCID and probably will never implement it. They use > other tricks to get similar optimizations, transparently to the OS. > Just curious, is this AMD similar optimizations Address Space Number (ASN) and Global flag US Patent 6,604,187. http://www.chip-architect.com/news/2003_09_21_Detailed_Architecture_of_AMDs= _64bit_Core.html I did not found anything about ASN in the AMD manual >> Bridge i5-2300 with FreeBSD 9 release patched with pcid.1.patch( the >> pcid.2.patch seems >> dependent on AVX and XSAVE stuffs which is available on -current). But >> it hangs up just in a few minutes. I doubt the nvidia-driver which is >> not recompiled with >> patched kernel is the root, I will check this out later, but does >> anyone meet similar problem? > There are two many variations compared to the config I did tested. > I do not see anything obvious in the changes between HEAD and stable/9 > which could be blamed. Nvidia driver might be bigger suspect, but again, > I am not aware of anything wrong with it. > >> >> I have two question about the pcid.2.patch > > Item 2 is clean, I fixed it. > > For the item 1, I was only able to decipher the proposal to optimize > the global shootdown handler to restore the %cr3 with bit 64 set to not > invalidate current PCID. Is there some more changes ? > yes, that is what I meant. I was wondering using another way that each process has different pcid in each active processor, just as the freebsd mips and powerpc uses. But obviously this way is more friendly to non-pcid x86 processor. > Thank you for looking at the patch.