Re: [GIT PULL] two more s390 bug fixes for 4.17

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

 



On Thu, 31 May 2018 09:14:00 -0700
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Wed, May 30, 2018 at 11:11:40AM +0200, Martin Schwidefsky wrote:
> > On Wed, 30 May 2018 00:41:30 -0700
> > Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >   
> > > > -	req->completion_data = cqr;
> > > > +	*((struct dasd_ccw_req **) blk_mq_rq_to_pdu(req)) = cqr;
> > > > +    
> > > 
> > > Please don't play such tricks.  In general your driver structure
> > > should have struct request embedded.  If for some reason
> > > struct dasd_ccw_req has a different life time please create a new
> > > structure instead of these hacks.  
> > 
> > Why do you consider this to be a 'trick'? The blk_mq_rq_to_pdu is
> > meant to be used to access a block of data that is is associated
> > with a request, no? With the change we store a single value, the
> > pointer to a struct dasd_ccw_req. The struct request comes first,
> > later do_dasd_request creates the struct dasd_ccw_req with the
> > CCW chain for the request. And for the blk timeout handler we need
> > a way to find the dasd_ccw_req again.  
> 
> We'll we try really hard to have a structure that we can use
> container_of on.  At least a minimal container with just the pointer
> for a quick fix, but in general it seems like you should be able
> to allocate the whole dasd_ccw_req with the request and just initialize
> it later.

A minimal container with a pointer is easy enough to do. To replace
our allocation scheme for the CCW chains will be hard. For one there
are internal I/Os that do not have an associated 'struct request'.
For those we need to allocate the memory on our own anyway.
Then the size of the memory block you need for the CCW varies wildly
and can be quite large. The tag cmd_size is fixed at the time
blk_mq_alloc_tag_set is called. If we replace out allocation scheme
this would force us to use the maximum size CCW chain for the
tag size, no?

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux