The state shared between sub events creates problems for multicore. The
only user is MOSDPGCreate2, so the optimization isn't really worth
salvaging.
Signed-off-by: Samuel Just <sjust@redhat.com>
Otherwise, tasks waiting on the stage will wake up on the wrong core.
Later, we may choose to statically enable this behavior only for stages
that can actually span cores, but this is ok for now.
Signed-off-by: Samuel Just <sjust@redhat.com>
We may later need to syncronize this across cores, perhaps during tick.
This should work for now, however.
Signed-off-by: Samuel Just <sjust@redhat.com>
We don't really want a global counter here if we can avoid it. Instead,
assign tids with core-local counters prefixed with the core id. We
continue to ensure that tids are unique within an osd boot, but lose
the property that sucessive tids on different cores are ordered. I
don't see anything relying on that property, however, so this should be
fine.
Signed-off-by: Samuel Just <sjust@redhat.com>
The main user of num_pgs was get_target_pg_log_entries(), but we
don't really want to be accessing a global counter there if we
can avoid it. Instead, compute a core-local target and use the
core-local pg count.
Signed-off-by: Samuel Just <sjust@redhat.com>
Context handling is pretty uniform accross all implementations,
may as well do it in the same place.
ShardedStoreProxy would need to handle it otherwise, since
callbacks need to be handled on the core do_transaction is
invoked on.
Signed-off-by: Samuel Just <sjust@redhat.com>
For now, FuturizedStore implementations assume that methods are invoked
on core 0. Later, we'll adapt each implementation to intelligently
support invocation on any pg core. Until then, this wrapper converts
the existing implementations to a safe, if not particuarly performant,
proxy behavior.
AlienStore should be safe as is.
Signed-off-by: Samuel Just <sjust@redhat.com>
OSDSingletonState will now only be responsible for the spg_t->core
mapping for pgs, the individual PerShardState's will hold local
PGMap's. PG management operations are now proxied from PGShardManager
to PerShardState. Subsequent patches will shard PerShardState.
Signed-off-by: Samuel Just <sjust@redhat.com>
The op will actually be run generally on a different core, so we don't
want to be returning a reference to it.
Signed-off-by: Samuel Just <sjust@redhat.com>
OSDMaps can occupy significant space in memory. Duplicating OSDMaps
across cores would multiply that memory usage as well as complicate
the internal structure sharing we do when applying OSDMap incrementals.
Because PeeringState and other interfaces expect efficient copying of
OSDMapRef objects we don't want to use foreign_ptr directly.
Instead, maintain a single cache and distribute local_shared_foreign_ptrs
to other cores. ShardServices becomes the only OSDMapService.
Signed-off-by: Samuel Just <sjust@redhat.com>
Can't access pg_shard_manager state here without invoking
start(). Instead, let's just be explicit about meta_coll
etc.
Signed-off-by: Samuel Just <sjust@redhat.com>
Introduce crimson::submit_to wrapper to transparently deal with
vanilla and errorated futures, adds helpers to errorator.h.
Signed-off-by: Samuel Just <sjust@redhat.com>
crimson: fix for pgs stuck in +wait along with some debug improvements
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
mgr/dashboard: use service call instead of form component
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>