From owner-svn-src-head@freebsd.org Sun Aug 27 15:51:17 2017 Return-Path: Delivered-To: svn-src-head@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 45A95DF2373; Sun, 27 Aug 2017 15:51:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) (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 08C2D75634; Sun, 27 Aug 2017 15:51:16 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi0-f46.google.com with SMTP id g127so15196522oic.1; Sun, 27 Aug 2017 08:51:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ESQTjw8rafNGbnsSyxxIwvfiK0oyxYvdXCDRR5fuJYc=; b=E/SG0Db43L6MdkTNllPFF+4jyBPP67H4Sv/dyZ63ZiMgOONQ+5QXlxIyis1Se4TCe9 88ucyg7rvUHMv0YLR4B2gXmeCPrUMn2lx+ZAzQQC5NYlZtSpWYbvtgwsXFwvMm0Zgvee Tv3dQPPLXfSaUNhMYuCUg0enJ1OkrLVw/3n26dmUQA+hb5NirFdEE4VDSQ729FwCSpHc sjc6fIaMJwRixB/kVB7P5Mfsu701ZtTuLwv73XWW8fZBZKQJGAREhX7oTvWaBqMeNKBd xNbyywt5M9G7xQt0umeoz9npp0HLoxu288b6O/8Wn2us3nUWH7meIop+5G3JeiJhGKKx rWvg== X-Gm-Message-State: AHYfb5i5aX9zUCczxomub/wDz6MwFsmdOVp96IOQuuhvE1S9KiKXWNMP EwiwrR7sazmTZMx1BwY= X-Received: by 10.202.181.138 with SMTP id e132mr5936843oif.8.1503849070217; Sun, 27 Aug 2017 08:51:10 -0700 (PDT) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com. [209.85.223.169]) by smtp.gmail.com with ESMTPSA id c187sm12193146oig.41.2017.08.27.08.51.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Aug 2017 08:51:10 -0700 (PDT) Received: by mail-io0-f169.google.com with SMTP id k22so9848149iod.2; Sun, 27 Aug 2017 08:51:09 -0700 (PDT) X-Received: by 10.107.44.68 with SMTP id s65mr3849959ios.88.1503849069644; Sun, 27 Aug 2017 08:51:09 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Sun, 27 Aug 2017 08:51:09 -0700 (PDT) In-Reply-To: References: <201708270514.v7R5EmDK064785@repo.freebsd.org> From: Conrad Meyer Date: Sun, 27 Aug 2017 08:51:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r322942 - head/sys/kern To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2017 15:51:17 -0000 On Sun, Aug 27, 2017 at 1:18 AM, Ed Schouten wrote: > Hi Conrad, > > [ Context: I don't understand anything about CPU topologies! ] > > 2017-08-27 7:14 GMT+02:00 Conrad Meyer : >> + while (top->cg_children == 1) { >> + top = &top->cg_child[0]; >> + top->cg_parent = NULL; >> + } > > This only removes layers from the top if they only have a single > child. Question: is it possible/likely to have CPU topologies where > one of the middle layers only has one child? If so, would it make > sense to use tree traversal here to do the flattening? Hi Ed, It is probably possible for middle layers to have a single child, and your proposal is a good one. This is just the canned patch from Jeff I already had lying around :-). Best, Conrad