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

Re: [Xen-devel] [PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr



On 05/03/13 09:06, Jan Beulich wrote:
>>>> On 04.03.13 at 18:19, Roger Pau MonnÃ<roger.pau@xxxxxxxxxx> wrote:
>> On 28/02/13 11:58, Jan Beulich wrote:
>>>>>> On 28.02.13 at 11:28, Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
>>> And then the biolist[] array really can be folded into a union
>>> with the remaining seg[] one, as their usage scopes are easily
>>> separable.
>>
>> Could we leave that for a further patch? I would like to avoid messing
>> any more with blkback, as I'm already touching a lot of bits with this
>> patch series.
> 
> Fine by me, but ...
> 
>>>> @@ -631,7 +629,8 @@ static int xen_blkbk_map(struct blkif_request *req,
>>>>                    if (ret)
>>>>                            continue;
>>>>  
>>>> -                  seg[i].buf = persistent_gnts[i]->dev_bus_addr |
>>>> +                  seg[i].buf = pfn_to_mfn(page_to_pfn(
>>>> +                          persistent_gnts[i]->page)) << PAGE_SHIFT |
>>>
>>> So why do you do this? The only reader masks the field with
>>> ~PAGE_MASK anyway.
>>
>> Yes, I only need to store first_sect.
> 
> ... as you're touching this code anyway, and as it'll make the
> code as well as the patch smaller, could you at least drop this
> pointless storing of the page address (which otherwise I'd ask
> you to properly parenthesize anyway)?
> 
> And iirc once that's dropped, the storing of first_sect ends up
> being identical between the if and else bodies, so it could be
> pulled out (further reducing code size, albeit at the price of a
> marginally bigger patch).

Yes, I've already done that, thanks for the suggestion.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.