Wip sharded threadpool

This is a pull request for sharded thread-pool.
Bizarrely, no. Given the simple modulus we're using to choose the shard, we
could put messages from the same PG into different shards if we used the
raw placement seed, instead of the same-for-all-ops-in-a-PG value that we
get from the PGRef.

On Monday, June 9, 2014, somnathr <notifications@github.com> wrote:

> In src/osd/OSD.cc:
>
> > @@ -8029,14 +8011,68 @@ void OSD::OpWQ::_process(PGRef pg, ThreadPool::TPHandle &handle)
> >    delete f;
> >    *_dout << dendl;
> >
> > -  osd->dequeue_op(pg, op, handle);
> > -  pg->unlock();
> > +  osd->dequeue_op(item.first, op, tp_handle);
> > +  (item.first)->unlock();
> > +
> > +}
> > +
> > +void OSD::ShardedOpWQ::_enqueue(pair <PGRef, OpRequestRef> item) {
> > +
> > +  uint32_t shard_index = (((item.first)->get_pgid().ps())% shard_list.size());
>
> What about this ?
>
> MOSDOp *m = static_cast<MOSDOp*>(item.second)->get_req());
> uint32_t shard_index = ((m->get_pg().ps())% shard_list.size());
>
> Shouldn't it do the job ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ceph/ceph/pull/1897/files#r13571884>.
>


-- 
Software Engineer #42 @ http://inktank.com | http://ceph.com