Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 343427 Details for
Bug 463481
=sys-fs/udev-199: long startup time and errors due to bad firmware related commit upstream
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch reverting the upstream commit
revert-children_max.patch (text/plain), 1.52 KB, created by
Samuli Suominen (RETIRED)
on 2013-03-27 13:36:44 UTC
(
hide
)
Description:
Patch reverting the upstream commit
Filename:
MIME Type:
Creator:
Samuli Suominen (RETIRED)
Created:
2013-03-27 13:36:44 UTC
Size:
1.52 KB
patch
obsolete
>diff -ur systemd-199.orig/src/udev/udevd.c systemd-199/src/udev/udevd.c >--- systemd-199.orig/src/udev/udevd.c 2013-03-25 22:28:30.593286782 +0200 >+++ systemd-199/src/udev/udevd.c 2013-03-27 15:21:39.626748821 +0200 >@@ -879,6 +879,29 @@ > fclose(f); > } > >+static int mem_size_mb(void) >+{ >+ FILE *f; >+ char buf[4096]; >+ long int memsize = -1; >+ >+ f = fopen("/proc/meminfo", "re"); >+ if (f == NULL) >+ return -1; >+ >+ while (fgets(buf, sizeof(buf), f) != NULL) { >+ long int value; >+ >+ if (sscanf(buf, "MemTotal: %ld kB", &value) == 1) { >+ memsize = value / 1024; >+ break; >+ } >+ } >+ >+ fclose(f); >+ return memsize; >+} >+ > static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink) > { > int ctrl = -1, netlink = -1; >@@ -1255,13 +1278,13 @@ > } > > if (children_max <= 0) { >- cpu_set_t cpu_set; >+ int memsize = mem_size_mb(); > >- children_max = 8; >- >- if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) { >- children_max += CPU_COUNT(&cpu_set) * 2; >- } >+ /* set value depending on the amount of RAM */ >+ if (memsize > 0) >+ children_max = 16 + (memsize / 8); >+ else >+ children_max = 16; > } > log_debug("set children_max to %u\n", children_max); >
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 463481
:
343423
|
343425
|
343427
|
343550