[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1520015040.2693.38.camel@hpe.com>
Date: Fri, 2 Mar 2018 17:38:58 +0000
From: "Kani, Toshi" <toshi.kani@....com>
To: "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"hch@....de" <hch@....de>, "axboe@...nel.dk" <axboe@...nel.dk>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"jglisse@...hat.com" <jglisse@...hat.com>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"maxg@...lanox.com" <maxg@...lanox.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"keith.busch@...el.com" <keith.busch@...el.com>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"jgg@...pe.ca" <jgg@...pe.ca>,
"oliveroh@....ibm.com" <oliveroh@....ibm.com>
Subject: Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory
On Fri, 2018-03-02 at 08:57 -0800, Linus Torvalds wrote:
> On Fri, Mar 2, 2018 at 8:22 AM, Kani, Toshi <toshi.kani@....com> wrote:
> >
> > FWIW, this thing is called MTRRs on x86, which are initialized by BIOS.
>
> No.
>
> Or rather, that's simply just another (small) part of it all - and an
> architected and documented one at that.
>
> Like the page table caching entries, the memory type range registers
> are really just "secondary information". They don't actually select
> between PCIe and RAM, they just affect the behavior on top of that.
>
> The really nitty-gritty stuff is not architected, and generally not
> documented outside (possibly) the BIOS writer's guide that is not made
> public.
>
> Those magical registers contain details like how the DRAM is
> interleaved (if it is), what the timings are, where which memory
> controller handles which memory range, and what are goes to PCIe etc.
>
> Basically all the actual *steering* information is very much hidden
> away from the kernel (and often from the BIOS too). The parts we see
> at a higher level are just tuning and tweaks.
>
> Note: the details differ _enormously_ between different chips. The
> setup can be very different, with things like Knights Landing having
> the external cache that can also act as local memory that isn't a
> cache but maps at a different physical address instead etc. That's the
> kind of steering I'm talking about - at a low level how physical
> addresses get mapped to different cache partitions, memory
> controllers, or to the IO system etc.
Right, MRC code is not documented publicly, and it is very much CPU
dependent. It programs address decoders and maps DRAMs to physical
address as you described. MTRRs have nothing to do with this memory
controller setting. That said, MTRRs specify CPU's memory access type,
such as UC and WB.
Thanks,
-Toshi
Powered by blists - more mailing lists