From owner-freebsd-arch@FreeBSD.ORG Sun Jun 21 16:17:28 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0E83106564A; Sun, 21 Jun 2009 16:17:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com [209.85.220.217]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD7F8FC16; Sun, 21 Jun 2009 16:17:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fxm17 with SMTP id 17so167299fxm.43 for ; Sun, 21 Jun 2009 09:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=kMs5hl0rMrLoduzM9odLHZg/FSTAczKHiMqPzAbWupA=; b=jXFSch78ucLlbiuOqmtI4Q+gmp+07kpiomZ8v2j6zIp02DdeLMpoYt0U/8o744/6fU 9GBqAAwiQBt2AGIkj5wba5KlVkuc8tScPkMhR8oVQr8X2Dp3tCBy93PFaPqw3VmwzpwP DNe+J4jSOFVEszB5Pnl7RPY3Ki1bTL0Cjf2Ww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=sZYQSd0ZTNqzJ0RB950r3MYXPYkYEEa1WaijqUF7BdI+YrImgosn778uH2yW+aKPdF nDFKSpCtHVudJXkO2BSsEcWPmIWs8j8n8Y/XD6i+aj7X2VIJW19jNvoMWQRjyAPaCYB6 wZQ6WNdQO2yMUEHwuAGjxy5v7b9gcZsdLaN00= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.105.195 with SMTP id u3mr4715192fao.13.1245599707490; Sun, 21 Jun 2009 08:55:07 -0700 (PDT) In-Reply-To: <20090621140312.GC71667@alchemy.franken.de> References: <20090609201127.GA50903@alchemy.franken.de> <4A2F1148.9090706@freebsd.org> <20090621140312.GC71667@alchemy.franken.de> Date: Sun, 21 Jun 2009 17:55:07 +0200 X-Google-Sender-Auth: 37ad2332a6eec4b3 Message-ID: <3bbf2fe10906210855r6c98568aj7bcc9ec3e057ae01@mail.gmail.com> From: Attilio Rao To: Marius Strobl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Peter Grehan Subject: Re: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2009 16:17:29 -0000 2009/6/21 Marius Strobl : > On Wed, Jun 17, 2009 at 12:55:52PM -1000, Jeff Roberson wrote: >> >> On Tue, 9 Jun 2009, Peter Grehan wrote: >> >> >>As for sparc64 allocating the storage for the dynamic area >> >>from end probably isn't a good idea as the pmap code assumes >> >>that the range from KERNBASE to end is covered by the pages >> >>allocated by and locked into the TLB for the kernel by the >> >>loader >> > >> >Ditto for ppc. It's possible to get the additional space from within or >> >after return from pmap_bootstrap() (like thread0's kstack, or the msgbuf). >> >> http://people.freebsd.org/~jeff/dpcpu.diff >> >> I have updated this patch based on feedback relating to various >> architectures md code. I tried to model most architectures after the way >> msgbuf memory was taken. I have no capacity to test anything other than >> i386 and amd64. ARM is reported to work with one minor diff. Apparently >> sparc64 worked with the earlier diff but this should be cleaner. If >> anyone can report back on sparc64, mips, or powerpc, I'd appreciate it. >> > > The earlier patch worked on sparc64 as long as the kernel > happened to leave enough room in the last 4MB page allocated > for it. > The new version unfortunately doesn't compile on sparc64 as > pmap_bootstrap_alloc() is static to its pmap.c (I think it > should also stay that way). Also the memory allocated with > it isn't safe to be used before we've taken over the trap > table. A kernel built with the sparc64 bits replaced with > the following patch boots fine: > http://people.freebsd.org/~marius/sparc64_dpcpu.diff > Do you have some simple test case for DPCPU which can be > used to verify that it actually works? I can suggest to switch pc_rm_queue of rmlocks in pcpu to be used as dynamic. It should not be difficult at all. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein