Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879978 Details for
Bug 1082123
Does not support more than 32 CPUs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
allow up to 1024 CPUs
libgtop2-allow-more-than-32-CPUs.patch (text/plain), 5.40 KB, created by
David King
on 2014-03-28 17:43:21 UTC
(
hide
)
Description:
allow up to 1024 CPUs
Filename:
MIME Type:
Creator:
David King
Created:
2014-03-28 17:43:21 UTC
Size:
5.40 KB
patch
obsolete
>From c1831377c81490aa36f7a9eedc4e171c6bc645e1 Mon Sep 17 00:00:00 2001 >From: David King <dking@redhat.com> >Date: Fri, 28 Mar 2014 15:11:25 +0000 >Subject: [PATCH] Allow up to 1024 CPUs > >Resolves: #1082123 >--- > libgtop2-allow-up-to-1024-CPUs.patch | 76 ++++++++++++++++++++++++++++++++++ > libgtop2-increase-cpuinfo-buffer.patch | 21 ++++++++++ > libgtop2.spec | 9 +++- > 3 files changed, 105 insertions(+), 1 deletion(-) > create mode 100644 libgtop2-allow-up-to-1024-CPUs.patch > create mode 100644 libgtop2-increase-cpuinfo-buffer.patch > >diff --git a/libgtop2-allow-up-to-1024-CPUs.patch b/libgtop2-allow-up-to-1024-CPUs.patch >new file mode 100644 >index 0000000..9ba5153 >--- /dev/null >+++ b/libgtop2-allow-up-to-1024-CPUs.patch >@@ -0,0 +1,76 @@ >+From efaaf6eb77e01f1ea002c19a261e4f3ac4788d25 Mon Sep 17 00:00:00 2001 >+From: Jason Xing <xinggang861@gmail.com> >+Date: Thu, 12 Dec 2013 20:36:10 +0000 >+Subject: Extending the cpu number from 32 to 1024 (bgo #323354, bgo #681632) >+ >+From: Jason Xing <xinggang861@gmail.com> >+ >+In 'Bug 323354 - Support a dynamic number of CPUs', there will be a >+solution which can dynamically allocate memory for large number of >+CPUs. As libgtop supports multiple operating systems, this work >+may take some time. >+ >+This patch is a temporary patch, which worked before the whole >+solution comes out. It only supports linux platform with CPU number >+up to 1024. >+ >+There are two Macroes which limit the statistics of CPU. One is >+GLIBTOP_NCPU. The other is a buffer size. This buffer used to read >+/proc/stat contents into. >+ >+https://bugzilla.gnome.org/show_bug.cgi?id=323354 >+https://bugzilla.gnome.org/show_bug.cgi?id=681632 >+--- >+diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h >+index 1d673e9..1566b29 100644 >+--- a/include/glibtop/cpu.h >++++ b/include/glibtop/cpu.h >+@@ -54,7 +54,7 @@ G_BEGIN_DECLS >+ Yes we are :) >+ Nobody should really be using more than 32 processors. >+ */ >+-#define GLIBTOP_NCPU 32 >++#define GLIBTOP_NCPU 1024 >+ >+ typedef struct _glibtop_cpu glibtop_cpu; >+ >+diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c >+index bedeab5..f2cbb4e 100644 >+--- a/sysdeps/linux/cpu.c >++++ b/sysdeps/linux/cpu.c >+@@ -66,11 +66,12 @@ _glibtop_init_cpu_s (glibtop *server) >+ /* Provides information about cpu usage. */ >+ >+ #define FILENAME "/proc/stat" >++#define STAT_BUFSIZ 81920 >+ >+ void >+ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) >+ { >+- char buffer [BUFSIZ], *p; >++ char buffer [STAT_BUFSIZ], *p; >+ int i; >+ >+ memset (buf, 0, sizeof (glibtop_cpu)); >+diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c >+index b39b99e..61c3d58 100644 >+--- a/sysdeps/linux/open.c >++++ b/sysdeps/linux/open.c >+@@ -61,13 +61,14 @@ static void set_linux_version(glibtop *server) >+ /* Opens pipe to gtop server. Returns 0 on success and -1 on error. */ >+ >+ #define FILENAME "/proc/stat" >++#define STAT_BUFSIZ 81920 >+ >+ void >+ glibtop_open_s (glibtop *server, const char *program_name, >+ const unsigned long features, >+ const unsigned flags) >+ { >+- char buffer [BUFSIZ], *p = buffer; >++ char buffer [STAT_BUFSIZ], *p = buffer; >+ >+ server->name = program_name; >+ >+-- >+cgit v0.9.2 >diff --git a/libgtop2-increase-cpuinfo-buffer.patch b/libgtop2-increase-cpuinfo-buffer.patch >new file mode 100644 >index 0000000..de7d1c7 >--- /dev/null >+++ b/libgtop2-increase-cpuinfo-buffer.patch >@@ -0,0 +1,21 @@ >+From af7e9cd1b64fea2fff360dcd8b32cf42a197d228 Mon Sep 17 00:00:00 2001 >+From: Robert Roth <robert.roth.off@gmail.com> >+Date: Wed, 21 Aug 2013 22:48:12 +0000 >+Subject: Increased buffersize to be able to hold larger cpuinfo files (bgo #681632) >+ >+--- >+diff --git a/sysdeps/linux/sysinfo.c b/sysdeps/linux/sysinfo.c >+index 9c82b7f..01821aa 100644 >+--- a/sysdeps/linux/sysinfo.c >++++ b/sysdeps/linux/sysinfo.c >+@@ -36,7 +36,7 @@ static glibtop_sysinfo sysinfo = { .flags = 0 }; >+ static void >+ init_sysinfo (glibtop *server) >+ { >+- char buffer [16384]; >++ char buffer [65536]; >+ gchar ** processors; >+ >+ if(G_LIKELY(sysinfo.flags)) return; >+-- >+cgit v0.9.2 >diff --git a/libgtop2.spec b/libgtop2.spec >index b26cb07..9d2c645 100644 >--- a/libgtop2.spec >+++ b/libgtop2.spec >@@ -3,7 +3,7 @@ > Name: libgtop2 > Summary: LibGTop library (version 2) > Version: 2.28.4 >-Release: 6%{?dist} >+Release: 7%{?dist} > License: GPLv2+ > URL: http://download.gnome.org/sources/libgtop/2.28 > Group: System Environment/Libraries >@@ -11,6 +11,8 @@ Group: System Environment/Libraries > Source: http://download.gnome.org/sources/libgtop/2.28/libgtop-%{version}.tar.xz > # Fix fetching rootfs stats (bz 871629) > Patch1: 0001-fsusage-Fix-fetching-rootfs-stats-on-Fedora-17.patch >+Patch2: libgtop2-increase-cpuinfo-buffer.patch >+Patch3: libgtop2-allow-up-to-1024-CPUs.patch > BuildRequires: glib2-devel > BuildRequires: gobject-introspection-devel > BuildRequires: libtool gettext >@@ -32,6 +34,8 @@ files to allow you to develop with LibGTop. > %prep > %setup -q -n libgtop-%{version} > %patch1 -p1 >+%patch2 -p1 >+%patch3 -p1 > > %build > %configure --disable-gtk-doc --disable-static >@@ -67,6 +71,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' > %exclude %{_datadir}/info > > %changelog >+* Fri Mar 28 2014 David King <dking@redhat.com> - 2.28.4-7 >+- Allow up to 1024 CPUs >+ > * Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.28.4-6 > - Mass rebuild 2014-01-24 > >-- >1.8.3.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1082123
: 879978