All of lore.kernel.org
 help / color / mirror / Atom feed
* seastar temporary_buffer/packet and ceph::buffer
@ 2018-01-15 15:49 kefu chai
  2018-01-15 16:53 ` kefu chai
  2018-01-15 17:19 ` Casey Bodley
  0 siblings, 2 replies; 14+ messages in thread
From: kefu chai @ 2018-01-15 15:49 UTC (permalink / raw)
  To: The Esoteric Order of the Squid Cybernetic, Casey Bodley

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.

cheers,


-- 
Regards
Kefu Chai

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-01-18 16:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 15:49 seastar temporary_buffer/packet and ceph::buffer kefu chai
2018-01-15 16:53 ` kefu chai
2018-01-15 17:04   ` Piotr Dałek
2018-01-15 17:09     ` kefu chai
2018-01-15 17:13       ` Piotr Dałek
2018-01-15 17:19 ` Casey Bodley
2018-01-15 19:30   ` Matt Benjamin
2018-01-15 20:48     ` Casey Bodley
2018-01-16 11:26       ` kefu chai
2018-01-16 22:15         ` Casey Bodley
2018-01-17 12:53           ` kefu chai
2018-01-17 13:13             ` Matt Benjamin
2018-01-17 15:42               ` kefu chai
2018-01-18 16:35             ` Casey Bodley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.