Wip sharded threadpool

This is a pull request for sharded thread-pool.
That sounds fine.

Software Engineer #42 @ http://inktank.com | http://ceph.com


On Tue, Jun 10, 2014 at 2:55 PM, somnathr <notifications@github.com> wrote:

> In src/osd/OSD.h:
>
> > -	osd(o),
> > -	pqueue(o->cct->_conf->osd_op_pq_max_tokens_per_priority,
> > -	       o->cct->_conf->osd_op_pq_min_cost)
> > -    {}
> > +    uint32_t num_shards;
> > +
> > +    public:
> > +      ShardedOpWQ(uint32_t pnum_shards, OSD *o, time_t ti, ShardedThreadPool* tp):
> > +        ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> >(ti, ti*10, tp),
> > +        osd(o), num_shards(pnum_shards) {
> > +        for(uint32_t i = 0; i < num_shards; i++) {
> > +          char lock_name[32] = {0};
> > +          snprintf(lock_name, sizeof(lock_name), "%s.%d", "OSD:ShardedOpWQ:", i);
> > +          char order_lock[32] = {0};
> > +          snprintf(order_lock, sizeof(order_lock), "%s.%d", "OSD:ShardedOpWQ:order:", i);
> > +          ShardData* one_shard = new ShardData(lock_name, order_lock, osd->cct->_conf->osd_op_pq_max_tokens_per_priority,
>
> op_tp is used for scrubbing as well, so, can't rename it peering_tp..May
> be op_tp->osd_tp and op_sharded_tp->op_tp ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ceph/ceph/pull/1897/files#r13622288>.
>