// create a buffer basing on user-configurable. it's intended to make
// our buffers THP-able.
ceph::unique_leakable_ptr<buffer::raw> KernelDevice::create_custom_aligned(
- const size_t len) const
+ const size_t len,
+ IOContext* const ioc) const
{
// just to preserve the logic of create_small_page_aligned().
if (len < CEPH_PAGE_SIZE) {
<< " bdev_read_preallocated_huge_buffers="
<< cct->_conf.get_val<std::string>("bdev_read_preallocated_huge_buffers")
<< dendl;
+ ioc->flags |= IOContext::FLAG_DONT_CACHE;
return lucky_raw;
} else {
// fallthrough due to empty buffer pool. this can happen also
auto start1 = mono_clock::now();
- auto p = ceph::buffer::ptr_node::create(create_custom_aligned(len));
+ auto p = ceph::buffer::ptr_node::create(create_custom_aligned(len, ioc));
int r = ::pread(choose_fd(buffered, WRITE_LIFE_NOT_SET),
p->c_str(), len, off);
auto age = cct->_conf->bdev_debug_aio_log_age;
++ioc->num_pending;
aio_t& aio = ioc->pending_aios.back();
aio.bl.push_back(
- ceph::buffer::ptr_node::create(create_custom_aligned(len)));
+ ceph::buffer::ptr_node::create(create_custom_aligned(len, ioc)));
aio.bl.prepare_iov(&aio.iov);
aio.preadv(off, len);
dout(30) << aio << dendl;
void _detect_vdo();
int choose_fd(bool buffered, int write_hint) const;
- ceph::unique_leakable_ptr<buffer::raw> create_custom_aligned(size_t len) const;
+ ceph::unique_leakable_ptr<buffer::raw> create_custom_aligned(size_t len, IOContext* ioc) const;
public:
KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, aio_callback_t d_cb, void *d_cbpriv);