On Mon, May 13, 2019 at 08:20:03AM -0400, tedheadster wrote:
> On Mon, May 13, 2019 at 3:02 AM Christoph Hellwig <h...@infradead.org> wrote:
> >
> > On Sun, May 12, 2019 at 02:55:48PM -0400, tedheadster wrote:
> > > Christoph,
> > >   On the same hardware (reboot with different kernel) I am getting
> > > _horrible_ disk I/O performance on the 5.1.1. kernel compiled on a
> > > 32-bit platform using HIGHMEM64G (PAE) to access 32GiB of physical
> > > memory.
> > >
> > > The numbers are truly terrible to copy a 16GiB file from one disk to a
> > > different one:
> >
> > This sounds like your storage controller only supports 32-bit DMA.
> > In that case any memory above that will be bounce buffered, that
> > is copied from one piece of memory to another, which in addition
> > to the copying will also create memory pressure.
> 
> I have this SATA controller (using ahci kernel driver):
> 
>  SATA controller [0106]: Intel Corporation C610/X99 series chipset
> sSATA Controller [AHCI mode] [8086:8d62] (rev 05)


That is odd.  While the AHIC spec allows for devices not to be
64-bit DMA capable, I've never heard of an Intel device that falls
into that category.

Can you apply the patch below and check if one of the messages shows
up in dmesg?

> I guess my request is for the VM folks to _indeed_ spend some effort
> optimizing large highmem setups because a 700% slowdown should be
> embarrassing. Who should I ask in that team about this?

linux...@kvack.org

> I do have 64-bit hardware but I regrettably have to run it in 32-bit
> mode with PAE support to access highmem64g memory.

Why?

---
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 021ce46e2e57..96add425253a 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -926,8 +926,12 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, 
int using_dac)
        if (pdev->dma_mask && pdev->dma_mask < DMA_BIT_MASK(32))
                return 0;
 
+       if (!using_dac)
+               dev_info(&pdev->dev, "Not 64-bit capable!\n");
+
        if (using_dac &&
            !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
+               dev_info(&pdev->dev, "failed to set 64-bit mask!\n");
                rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
                if (rc) {
                        rc = dma_set_coherent_mask(&pdev->dev, 
DMA_BIT_MASK(32));

Reply via email to