From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16993 invoked by alias); 20 Nov 2012 14:44:59 -0000 Received: (qmail 16871 invoked by uid 22791); 20 Nov 2012 14:44:56 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Nov 2012 14:44:46 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAKEihhc011318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Nov 2012 09:44:43 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAKEieX5012676; Tue, 20 Nov 2012 09:44:40 -0500 Message-ID: <50AB9757.20204@redhat.com> Date: Tue, 20 Nov 2012 14:44:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: David Miller CC: gdb-patches@sourceware.org, stan@codesourcery.com, kcy@codesourcery.com Subject: Re: [PATCH] Fix 'info os' crashes on sparc. References: <20121120.003006.1287326526424655175.davem@davemloft.net> <20121120.011339.2105774812993461488.davem@davemloft.net> In-Reply-To: <20121120.011339.2105774812993461488.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00534.txt.bz2 On 11/20/2012 06:13 AM, David Miller wrote: > The thing is, this code still has a problem. The number of cpus > active doesn't tell us anything about what the largest cpu number > might be. > > The cpus numbers themselves can be arbitrarily sparse and beyond the > number of cpus. > > And it's the cpu numbers that are used to index these various tables. > Indeed. > gdb/ > > 2012-11-19 David S. Miller > > * common/linux-osdata.c (get_number_of_cpu_cores): Delete. > (linux_xfer_osdata_processes): Fetch _SC_NPROCESSORS_ONLN via > sysconf. > (get_cores_used_by_process): Update comment. OK. Thanks. -- Pedro Alves