lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Jun 2021 01:37:16 -0700
From:   John Hubbard <jhubbard@...dia.com>
To:     Balbir Singh <bsingharora@...il.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Alistair Popple <apopple@...dia.com>, <linux-mm@...ck.org>,
        <nouveau@...ts.freedesktop.org>, <bskeggs@...hat.com>,
        <rcampbell@...dia.com>, <linux-doc@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <hch@...radead.org>, <jglisse@...hat.com>, <willy@...radead.org>,
        <jgg@...dia.com>, <peterx@...hat.com>, <hughd@...gle.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v9 07/10] mm: Device exclusive memory access

On 6/2/21 1:50 AM, Balbir Singh wrote:
...
>>> only impact the address space of programs using the GPU. Should the exclusively
>>> marked range live in the unreclaimable list and recycled back to active/in-active
>>> to account for the fact that
>>>
>>> 1. It is not reclaimable and reclaim will only hurt via page faults?
>>> 2. It ages the page correctly or at-least allows for that possibility when the
>>>      page is used by the GPU.
>>
>> I'm not sure that that is *necessarily* something we can conclude. It depends upon
>> access patterns of each program. For example, a "reduction" parallel program sends
>> over lots of data to the GPU, and only a tiny bit of (reduced!) data comes back
>> to the CPU. In that case, freeing the physical page on the CPU is actually the
>> best decision for the OS to make (if the OS is sufficiently prescient).
>>
> 
> With a shared device or a device exclusive range, it would be good to get the device
> usage pattern and update the mm with that knowledge, so that the LRU can be better

Integrating a GPU (or "device") processor and it's mm behavior with the Linux kernel is
always an interesting concept. Certainly worth exploring, although it's probably
not a small project by any means.

> maintained. With your comment you seem to suggest that a page used by the GPU might
> be a good candidate for reclaim based on the CPU's understanding of the age of
> the page should not account for use by the device
> (are GPU workloads - access once and discard?)
> 

Well, that's a little too narrow of an interpretation. The GPU is a fairly general
purpose processor, and so it has all kinds of workloads. I'm trying to discourage
any hopes that one can know, in advance, precisely how the GPU's pages need to be
managed. It's similar to the the CPU, in that regard. My example was just one, out
of a vast pool of possible behaviors.

thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ