Indiana release was hit by a P1 bug recently. Further details are recorded in: http://defect.opensolaris.org/bz/show_bug.cgi?id=1069.
  It was reported on laptops with Intel graphics card.  Colleagues in US had reproduced it on their laptops, however we could not reproduce it on our latop with the same model.  Finally, we figured out that all the laptops in China are equipped with less than 4G physical memory, while the laptop in US are equipped with 4G.
  Before further detail, I will give some background about Intel graphics card.  Intel graphics card is a integrated device in Intel's chipset and it target at the low end market.  Actually, it does not have any video memory connected to the graphics chip, but a reserved aperture to remap system memory.  The system can dynamically pin and remap the system memory to fulfill the aperture.  Usually, it can consume tens or hundreds of megabytes of system memory.  And that is what agpgart driver is for.  When the agpgart driver was developed, Intel only was shipping 32-bit hardware.  Consequently, solaris can only have 4G virtual memory on such systems.  Even more, user applications will consume part of the 4G space, that make the kernel virtual space more precious.  The standard DDI DMA interfaces must allocate the kernel virtual space first and then get the physical pages.  So a set of pmem interfaces were developed to allocate the physical memory directly without occupying any kernel virtual space. agpgart driver depend on pmem interfaces to allocate and free the memory.  One defect of pmem interfaces was that a certain physical range could not be guaranteed when requesting the physical pages. As a result, agpgart driver may get a physical page above 4G under 64-bit kernel mode. That cause agpgart driver have wrong GART/GTT table entries pointing to pages owned by ZFS.  ZFS pages will easily be corrupted.
  The quick solution is to use the standard DDI DMA interfaces to allocate physical pages under 64-bit kernel mode, for the kernel virtual memory is not so expensive for 64-bit kernel.  The physical pages can be qualified to a certain range by a parameter named DDI DMA attribute.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2008 by Ming Shu