Displaying 9 results from an estimated 9 matches for "page_refs".
Did you mean:
page_ref
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
...ake_pages_present(unsigned long add
BUG_ON(addr >= end);
BUG_ON(end > vma->vm_end);
len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE;
+
+ if (page_host_discards() && (vma->vm_flags & VM_LOCKED)) {
+ int rlen = len;
+ ret = 0;
+ while (rlen > 0) {
+ struct page *page_refs[32];
+ int chunk, cret, i;
+
+ chunk = rlen < 32 ? rlen : 32;
+ cret = get_user_pages(current, current->mm, addr,
+ chunk, write, 0,
+ page_refs, NULL);
+ if (cret > 0) {
+ for (i = 0; i < cret; i++)
+ page_cache_release(page_refs[i]);
+ ret += cret...
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
...ake_pages_present(unsigned long add
BUG_ON(addr >= end);
BUG_ON(end > vma->vm_end);
len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE;
+
+ if (page_host_discards() && (vma->vm_flags & VM_LOCKED)) {
+ int rlen = len;
+ ret = 0;
+ while (rlen > 0) {
+ struct page *page_refs[32];
+ int chunk, cret, i;
+
+ chunk = rlen < 32 ? rlen : 32;
+ cret = get_user_pages(current, current->mm, addr,
+ chunk, write, 0,
+ page_refs, NULL);
+ if (cret > 0) {
+ for (i = 0; i < cret; i++)
+ page_cache_release(page_refs[i]);
+ ret += cret...
2020 Sep 14
2
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On 9/14/20 4:10 PM, Dan Williams wrote:
> On Mon, Sep 14, 2020 at 3:45 PM Ralph Campbell <rcampbell at nvidia.com> wrote:
>>
>> ZONE_DEVICE struct pages have an extra reference count that complicates the
>> code for put_page() and several places in the kernel that need to check the
>> reference count to see that a page is not being used (gup, compaction,
>>
2020 Sep 15
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On Mon, Sep 14, 2020 at 04:53:25PM -0700, Ralph Campbell wrote:
> Since set_page_refcounted() is defined in mm_interal.h I would have to
> move the definition to someplace like page_ref.h or have the drivers
> cal init_page_count() or set_page_count() since get_page() calls
> VM_BUG_ON_PAGE() if refcount == 0.
> I'll move set_page_refcounted() since that is what the page
2020 Sep 15
2
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On 9/15/20 9:29 AM, Christoph Hellwig wrote:
> On Mon, Sep 14, 2020 at 04:53:25PM -0700, Ralph Campbell wrote:
>> Since set_page_refcounted() is defined in mm_interal.h I would have to
>> move the definition to someplace like page_ref.h or have the drivers
>> cal init_page_count() or set_page_count() since get_page() calls
>> VM_BUG_ON_PAGE() if refcount == 0.
>>
2018 Dec 10
1
[PATCH net 4/4] vhost: log dirty page correctly
Hi Jason,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net/master]
url: https://github.com/0day-ci/linux/commits/Jason-Wang/Fix-various-issue-of-vhost/20181210-223236
config: i386-randconfig-x072-201849 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All
2020 Sep 14
5
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
.../*
* When a device_private page is freed, the page->mapping field
* may still contain a (stale) mapping value. For example, the
diff --git a/mm/migrate.c b/mm/migrate.c
index 4f89360d9e77..be1586582b52 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -380,11 +380,6 @@ static int expected_page_refs(struct address_space *mapping, struct page *page)
{
int expected_count = 1;
- /*
- * Device private pages have an extra refcount as they are
- * ZONE_DEVICE pages.
- */
- expected_count += is_device_private_page(page);
if (mapping)
expected_count += thp_nr_pages(page) + page_has_privat...
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi:
This series tries to fix various issues of vhost:
- Patch 1 adds a missing write barrier between used idx updating and
logging.
- Patch 2-3 brings back the protection of device IOTLB through vq
mutex, this fixes possible use after free in device IOTLB entries.
- Patch 4 fixes the diry page logging when device IOTLB is
enabled. We should done through GPA instead of GIOVA, this was done
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi:
This series tries to fix various issues of vhost:
- Patch 1 adds a missing write barrier between used idx updating and
logging.
- Patch 2-3 brings back the protection of device IOTLB through vq
mutex, this fixes possible use after free in device IOTLB entries.
- Patch 4 fixes the diry page logging when device IOTLB is
enabled. We should done through GPA instead of GIOVA, this was done