From owner-freebsd-hackers@freebsd.org Sat Jul 2 17:31:04 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54129B8FC7B for ; Sat, 2 Jul 2016 17:31:04 +0000 (UTC) (envelope-from outro.pessoa@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D875629EB; Sat, 2 Jul 2016 17:31:03 +0000 (UTC) (envelope-from outro.pessoa@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id r201so66062419wme.1; Sat, 02 Jul 2016 10:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7uvQsamNXBQm32CjS4GtLwRiJieUrEQCylSlJGfF544=; b=e/Cy1lV9I9H6Tc9ov5/PS5G6gNHs1AiQZTnAlJtljKqR0frukQNa/r37pjGeH7L9q/ YYKx9eY+FDPsNBwkeruWbbVq4JzBcyjmdM57+he4228LDxpMefEtlUPcR33tvO0BoxCS rY1qtZ5o24xh0hF6YRf4HmwjOUkh/toKQM3YXU9x/XqMETvFn9o4g8C5DDBhxmnpOgql Rj7BmpUcd44Nhuq4uDIbUQYVwj02ZsH905+G7qVbI8N5AjqGHGlQsL8Xc694/TdX/+Xz lleWfs7085hn3luIZcpZowr+yO+lGpPj3xXcI7GHAe2pEPZMgBpQEfzHgOCDuwT+TFRB RDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7uvQsamNXBQm32CjS4GtLwRiJieUrEQCylSlJGfF544=; b=OfCN06nozxZO21HujhRJFfZBQiSqkpY/Zixeo7IwdnUa3fZeF+83rEohbaFm7LNAb0 iu0B2HuPi0qrY5xTye+XgS3VfMJ/ff7R/kGeB5/w33zb36iqBUsiF6YFMykLf+2/uZNQ /K+8qZzacEx4bXdacT9NmGScf1RAim+MGYqRWbsWOq88/qinWBH/4VMTFjtGcF6cVflD NLMSbGSIPAQ2NMdqR93r1ImHQUn/BJa37Y96I7TLaeBn31x9BqrTOIHfAINpbTbUZTlY qE3O8xM0ogOz6d31nHDTd1ASqEWZMHRHiByXkq2SS+GWwM26Q9l8pPy1bP2CrF6kQJyD 5CAQ== X-Gm-Message-State: ALyK8tKiYCA9eHAW5CprNJCCDhivtjAyD5OJpMGEY+pU0d5/yzo5ME66qWSceWRI+VTdcU4UvKNFp2d8yof66g== X-Received: by 10.28.164.68 with SMTP id n65mr3780833wme.12.1467480661879; Sat, 02 Jul 2016 10:31:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.217.148 with HTTP; Sat, 2 Jul 2016 10:31:01 -0700 (PDT) In-Reply-To: <57761101.3030101@freebsd.org> References: <57761101.3030101@freebsd.org> From: outro pessoa Date: Sat, 2 Jul 2016 13:31:01 -0400 Message-ID: Subject: Re: Review request: sparse CPU ID maps To: Nathan Whitehorn Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2016 17:31:04 -0000 Nathan, What type of ARM hardware do you need? On Fri, Jul 1, 2016 at 2:43 AM, Nathan Whitehorn wrote: > I have been working on fixing PR 210106 ( > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210106) and have run > into the fact that several pieces of the kernel, notably parts of > subr_taskqueue.c, require that CPU IDs be dense in the range [0, mp_ncpus), > which the kernel does not guarantee, for example in the case of CPUs with > hyperthreading in which the threading is disabled. This is leading to hangs > in late boot in -CURRENT. > > I've prepared the following patch, which fixes PR 210106, but I would like > a few more eyeballs on it before committing it. It fixes most of the bogus > uses of mp_ncpus in the kernel, but not all: doing grep -R '< mp_ncpus' > /sys | wc -l gives 52 remaining instances of loops in [0, mp_ncpus) or [1, > mp_ncpus), most or all of which should instead be CPU_FOREACH(), but none > of which I feel comfortable changing (36 are in ARM code for hardware I > don't have access to). > > The patch lives here: > http://people.freebsd.org/~nwhitehorn/sparse_cpu_ids.diff > -Nathan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >