From: Frank Ch. Eigler Date: Wed, 14 Sep 2011 15:46:55 +0000 (-0400) Subject: BZ738242: tweak memory allocation estimation logic X-Git-Tag: release-1.7~153^2~25 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=66abcb3cf44caac25f3f20c2147cde961e31b633;p=systemtap.git BZ738242: tweak memory allocation estimation logic * runtime/transport/relay_v2.c (_stp_transport_data_fs_init): In BULK_MODE, stop overestimating the number of pages we will need: it's num_online_cpus rather than num_possible_cpus. --- diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c index ff621a489..763436de8 100644 --- a/runtime/transport/relay_v2.c +++ b/runtime/transport/relay_v2.c @@ -305,7 +305,7 @@ static int _stp_transport_data_fs_init(void) /* Create "trace" file. */ npages = _stp_subbuf_size * _stp_nsubbufs; #ifdef STP_BULKMODE - npages *= num_possible_cpus(); + npages *= num_online_cpus(); #endif npages >>= PAGE_SHIFT; si_meminfo(&si);