Summary: | sys-apps/portage-2.1.10.65 uses more cpu than it should (due to PORT_LOGDIR setting?) | ||
---|---|---|---|
Product: | Portage Development | Reporter: | SpanKY <vapier> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 431026 |
Description
SpanKY
2012-08-20 03:55:51 UTC
(In reply to comment #0) > shouldn't this use a blocking call ? It does block until it hits the 3 second timeout, which shows as 3000 ms in your strace log. The timeout is for it to update the load avg display. > why are we polling with the poll syscall ? We could use epoll instead, since python has bindings for that too. (In reply to comment #1) there is no load avg display (i'm not using --jobs or --quiet-build). you can see that there aren't any syscalls made other than the poll/gettimeofday, which means portage isn't querying for loadavg stats here. maybe the timeout logic should be checking to see if there's any load display to be updating in the first place ? (In reply to comment #2) > maybe the timeout logic should be checking to see if there's any load > display to be updating in the first place ? Yeah, this should do it: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=31b41fe7a20e6e0d19ff2383a746d61d8aa18b50 (In reply to comment #1) > (In reply to comment #0) > > why are we polling with the poll syscall ? > > We could use epoll instead, since python has bindings for that too. This is implemented now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b986bcdd49c5523ffe6972377071d556a819c776 This is fixed in 2.1.11.11 and 2.2.0_alpha122. In portage-2.1.11.22 and 2.2.0_alpha133 there's a fix for a related, and much worse bug: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2b2580d9dac62aa720e5d996fa5102ee5caeffe7 |