Re: seastar temporary_buffer/packet and ceph::buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 15, 2018 at 11:49 PM, kefu chai <tchaikov@xxxxxxxxx> wrote:
> hey Casey,
>
>
> i've been thinking about how to better integrate
> seastar::temporary_buffer and seastar::packet into our denc and
> messenger subsystems based on your wip-seastar-msg branch.
>
> as you pointed out to me that
>
>> the conversions between ceph::buffer::ptr and seastar::temporary_buffer in https://github.com/cbodley/ceph/tree/wip-seastar-msg/ work, but they cost an allocation in both directions (seastar::make_object_deleter() has to allocate for type erasure).
>
> and just like ceph::buffer::ptr, seastar::temporary_buffer also
> manages the life cycle of the underlying memory chunk using refcount.
> it's a waste to do the refcounting for the same mem chunk twice in the
> same application.
>
> if we want to avoid the overhead of duplicated refcounting and
> allocation in the conversion to and from ceph::buffer::ptr, i think,
> we need to allocate the temporary_buffer along with buffer::ptr. in
> other words, to include seastar::temporary_buffer as a member variable
> in ceph::buffer:ptr.
>
> i am preparing a change to prototype this approach. the downside of it is:
>
> - we need to include a placeholder structure in buffer.h for
> seastar::tempoary_buffer<char>. and cast it to
> seastar::tempoary_buffer<char> in buffer.cc . otherwise we need to
> include seastar headers in librados.

- we cannot store the crc map along with the raw class anymore. this
might be a show stopper.
- we can not use zero copy interfaces anymore. but i think it's fine.
as we need to use future/promise based interfaces for IO.

>
> cheers,
>
>
> --
> Regards
> Kefu Chai



-- 
Regards
Kefu Chai
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux