public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	Hillf Danton <dhillf@gmail.com>,
	tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	rob@landley.net, akpm@linux-foundation.org, joerg.roedel@amd.com,
	bhelgaas@google.com, shuahkhan@gmail.com,
	fujita.tomonori@lab.ntt.co.jp, linux-kernel@vger.kernel.org,
	x86@kernel.org
Subject: Re: [PATCH v2 1/7] swiotlb: Make io_tlb_end a physical address instead of a virtual one
Date: Fri, 19 Oct 2012 09:21:41 -0700	[thread overview]
Message-ID: <50817E15.60308@intel.com> (raw)
In-Reply-To: <20121019141851.GM26830@phenom.dumpdata.com>

On 10/19/2012 07:18 AM, Konrad Rzeszutek Wilk wrote:
> On Thu, Oct 18, 2012 at 08:53:33AM -0700, Alexander Duyck wrote:
>> end to be physical instead of virtual.  I reviewed the code and realized
>> that I wasn't saving anything by removing it since the overall code was
>> larger as a result so I just converted it to a physical address.  There
>> are no users of io_tlb_end that are accessing it as a virtual value so
>> all I did is just change it to a physical one and drop the virt_to_phys
>> calls that were made on it.  If I am not mistaken by the second patch
>> the is_swiotlb_buffer call is literally what you have described above. 
>> Here is the snippet from the 2nd patch:
>>
>> static int is_swiotlb_buffer(phys_addr_t paddr)
>>  {
>> -	return paddr >= virt_to_phys(io_tlb_start) && paddr < io_tlb_end;
>> +	return paddr >= io_tlb_start && paddr < io_tlb_end;
>>  }
>>
>>
>> As far as the number of patches I decided to do this incrementally
>> instead of trying to do it all at once.  That way it is clearer to the
>> reviewer what I am doing in each step and it can be more easily bisected
>> in case I messed up somewhere.  If you want fewer patches I can do that
>> but I don't see the point in combining patches since they are all just
>> going to result in the same total change anyway.
> No that is OK. BTW, I did a testing of your V2 patches with Xen-SWIOTLB
> and they worked. But it was on non-debug env. The debug one does such
> evil things as make the initial domain memory start at the end physical
> memory and put the underlaying MFNs (machine frame numbers, the real
> physical frames) in reverse order. So for example pfn 100, ends up being
> mfn 0xf00d, and pfn 101 ends up being oxf00c.

Glad to hear they are working under Xen.  As I said I am pretty sure if
it was working before it should still be working after these changes
since the only difference is that instead of working with virtual
addresses and having to call virt_to_phys to get the pseudo-physical
addresses we are just working with the pseudo-physical addresses directly.

Thanks,

Alex





  reply	other threads:[~2012-10-19 16:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 20:34 [PATCH v2 0/7] Improve swiotlb performance by using physical addresses Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 1/7] swiotlb: Make io_tlb_end a physical address instead of a virtual one Alexander Duyck
2012-10-13 12:52   ` Hillf Danton
2012-10-15 15:43     ` Alexander Duyck
2012-10-18 12:41       ` Konrad Rzeszutek Wilk
2012-10-18 15:53         ` Alexander Duyck
2012-10-19 14:18           ` Konrad Rzeszutek Wilk
2012-10-19 16:21             ` Alexander Duyck [this message]
2012-10-11 20:34 ` [PATCH v2 2/7] swiotlb: Make io_tlb_start " Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 3/7] swiotlb: Make io_tlb_overflow_buffer a physical address Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 4/7] swiotlb: Return physical addresses when calling swiotlb_tbl_map_single Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 5/7] swiotlb: Use physical addresses for swiotlb_tbl_unmap_single Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 6/7] swiotlb: Use physical addresses instead of virtual in swiotlb_tbl_sync_single Alexander Duyck
2012-10-11 20:34 ` [PATCH v2 7/7] swiotlb: Do not export swiotlb_bounce since there are no external consumers Alexander Duyck
2012-10-12 16:05 ` [PATCH v2 0/7] Improve swiotlb performance by using physical addresses Alexander Duyck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50817E15.60308@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=dhillf@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hpa@zytor.com \
    --cc=joerg.roedel@amd.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rob@landley.net \
    --cc=shuahkhan@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox