test/rgw/test_http_manager.cc: In member function ‘virtual void HTTPManager_SignalThread_Test::TestBody()’:
test/rgw/test_http_manager.cc:40:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < num_requests; i++) {
^
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
In ceph_str_hash_linux(), hash value is defined as unsigned long,
which is 8 bytes on 64-bit platforms when compiled with gcc. But
the return value is truncated to 4 bytes, and there's no need to
preserve 8 bytes intermediate value in the algorithm. The compiler
doesn't figure out this fact and produces redundant code.
After removing the "long" definition, this route runs much faster.
Following result are tested on x86_64 and aarch64 platforms, built
by gcc 5.3.1 with optimization level -O2. Same output is observed
with gcc 4.8.4 and -O3 optimization.
ARM Cortex-A57
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32 | 0.088 us | 0.067 us | 24% |
+---------------+--------------+---------------+-------------+
| 4096 | 10.26 us | 8.20 us | 20% |
+---------------+--------------+---------------+-------------+
| 65536 | 164 us | 131 us | 20% |
+---------------+--------------+---------------+-------------+
| 1048576 | 2624 us | 2099 us | 20% |
+---------------+--------------+---------------+-------------+
Intel i7-4790
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32 | 0.033 us | 0.028 us | 16.3% |
+---------------+--------------+---------------+-------------+
| 4096 | 3.87 us | 3.64 us | 6.2% |
+---------------+--------------+---------------+-------------+
| 65536 | 61.3 us | 57.8 us | 5.7% |
+---------------+--------------+---------------+-------------+
| 1048576 | 973 us | 917 us | 5.8% |
+---------------+--------------+---------------+-------------+
Signed-off-by: Yibo Cai <yibo.cai@linaro.org>
Which is deprecated file_layout_t::is_valid(), and removing
the unnecessary code is always the preferred option.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
There are two checks in the code for ENOTEMPTY, clarify that the first check is
doing a fast check without locks.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
when HAVE_CURL_MULTI_WAIT is 0, the pipe fd is never added to the
readfds for select(), so FD_ISSET() is always false. this prevents us
from ever trying to read from the fd, and the pipe's buffer eventually
fills up and deadlocks callers of RGWHTTPManager::signal_thread() when
they try to write to the pipe
Fixes: http://tracker.ceph.com/issues/16368
Signed-off-by: Casey Bodley <cbodley@redhat.com>
If the exclusive lock is lost while the journal is in the
replay state, the journal close will block until the replay
completes. The new callback will facilitate stopping replay
in a timely fashion so that the journal can be closed.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
mon/osdmonitor: decouple adjust_heartbeat_grace and min_down_reporters
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>