All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing
@ 2018-06-12 12:41 Michał Winiarski
  2018-06-12 12:41 ` [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock Michał Winiarski
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Michał Winiarski @ 2018-06-12 12:41 UTC (permalink / raw)
  To: igt-dev

We already have the routine we need in drv_suspend. Let's move it to lib
and use it in the mlocking tests. We can also make it a bit faster if we
tweak the initial step and initial amount.
(I think it's safe to assume assume that we should be able to lock 3/4
of RAM, this cuts the probe time on my 32G SKL - from ~530s to ~180s)

v2: Use available mem, amend step, also lock outside of fork,
    early exit if the assumption is wrong (Chris)
    Update the function name in doc (Ewelina)
v3: Total for pin, available for initial lock (Chris)

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_aux.h       |  1 +
 lib/intel_os.c      | 57 +++++++++++++++++++++++++++++++++++++++++++++
 tests/drv_suspend.c | 44 +++++++++-------------------------
 3 files changed, 69 insertions(+), 33 deletions(-)

diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 0eb96e44..9a962881 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -209,6 +209,7 @@ void intel_purge_vm_caches(int fd);
 uint64_t intel_get_avail_ram_mb(void);
 uint64_t intel_get_total_ram_mb(void);
 uint64_t intel_get_total_swap_mb(void);
+size_t intel_get_total_pinnable_mem(void);
 
 int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
 			 uint64_t *out_required, uint64_t *out_total);
diff --git a/lib/intel_os.c b/lib/intel_os.c
index f7ad05ac..e82173b3 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -183,6 +183,63 @@ intel_get_total_swap_mb(void)
 	return retval / (1024*1024);
 }
 
+/**
+ * intel_get_total_pinnable_mem:
+ *
+ * Compute the amount of memory that we're able to safely lock.
+ * Note that in order to achieve this, we're attempting to repeatedly lock more
+ * and more memory, which is a time consuming process.
+ *
+ * Returns: Amount of memory that can be safely pinned, in bytes.
+ */
+size_t
+intel_get_total_pinnable_mem(void)
+{
+	uint64_t *can_mlock, pin, avail;
+	size_t ret;
+
+	pin = (intel_get_total_ram_mb() + 1) << 20;
+	avail = (intel_get_avail_ram_mb() + 1) << 20;
+
+	can_mlock = mmap(NULL, pin, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	igt_require(can_mlock != MAP_FAILED);
+
+	/*
+	 * We can reasonably assume that we should be able to lock at
+	 * least 3/4 of available RAM
+	 */
+	*can_mlock = (avail >> 1) + (avail >> 2);
+	if (mlock(can_mlock, *can_mlock)) {
+		*can_mlock = 0;
+		goto out;
+	}
+
+	for (uint64_t inc = 1024 << 20; inc >= 4 << 10; inc >>= 2) {
+		igt_debug("Testing mlock %'"PRIu64" B (%'"PRIu64" MiB)\n",
+			  *can_mlock, *can_mlock >> 20);
+
+		igt_fork(child, 1) {
+			for (uint64_t bytes = *can_mlock;
+			     bytes <= pin;
+			     bytes += inc) {
+				if (mlock(can_mlock, bytes))
+					break;
+
+				*can_mlock = bytes;
+				__sync_synchronize();
+			}
+		}
+		__igt_waitchildren();
+		igt_assert(!mlock(can_mlock, *can_mlock));
+	}
+
+out:
+	ret = *can_mlock;
+	munmap(can_mlock, pin);
+
+	return ret;
+}
+
 static uint64_t vfs_file_max(void)
 {
 	static long long unsigned max;
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c
index 9a9ff200..b4212dca 100644
--- a/tests/drv_suspend.c
+++ b/tests/drv_suspend.c
@@ -163,52 +163,30 @@ test_sysfs_reader(bool hibernate)
 static void
 test_shrink(int fd, unsigned int mode)
 {
-	uint64_t *can_mlock, pin;
+	void *mem;
+	size_t size;
 
 	gem_quiescent_gpu(fd);
 	intel_purge_vm_caches(fd);
 
-	pin = (intel_get_total_ram_mb() + 1) << 20;
-
-	igt_debug("Total memory %'"PRIu64" B (%'"PRIu64" MiB)\n",
-		  pin, pin >> 20);
-	can_mlock = mmap(NULL, pin, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
-	igt_require(can_mlock != MAP_FAILED);
-
-	/* Lock all the system memory, forcing the driver into swap and OOM */
-	for (uint64_t inc = 64 << 20; inc >= 4 << 10; inc >>= 1) {
-		igt_debug("Testing+ %'"PRIu64" B (%'"PRIu64" MiB)\n",
-			  *can_mlock, *can_mlock >> 20);
-
-		igt_fork(child, 1) {
-			for (uint64_t bytes = *can_mlock;
-			     bytes <= pin;
-			     bytes += inc) {
-				if (mlock(can_mlock, bytes))
-					break;
-
-				*can_mlock = bytes;
-				__sync_synchronize();
-			}
-		}
-		__igt_waitchildren();
-	}
+	size = intel_get_total_pinnable_mem();
+	igt_require(size > 64 << 20);
+	size -= 64 << 20;
 
-	intel_purge_vm_caches(fd);
+	mem = mmap(NULL, size, PROT_READ, MAP_SHARED | MAP_ANON, -1, 0);
 
-	igt_require(*can_mlock > 64 << 20);
-	*can_mlock -= 64 << 20;
+	intel_purge_vm_caches(fd);
 
 	igt_debug("Locking %'"PRIu64" B (%'"PRIu64" MiB)\n",
-		  *can_mlock, *can_mlock >> 20);
-	igt_assert(!mlock(can_mlock, *can_mlock));
+		  size, size >> 20);
+	igt_assert(!mlock(mem, size));
 	igt_info("Locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
-		 *can_mlock, *can_mlock >> 20);
+		 size, size >> 20);
 
 	intel_purge_vm_caches(fd);
 	igt_system_suspend_autoresume(mode, SUSPEND_TEST_NONE);
 
-	munmap(can_mlock, pin);
+	munmap(mem, size);
 }
 
 static void
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock
  2018-06-12 12:41 [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Michał Winiarski
@ 2018-06-12 12:41 ` Michał Winiarski
  2018-06-12 13:29   ` Ewelina Musial
  2018-06-12 13:28 ` [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Ewelina Musial
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Michał Winiarski @ 2018-06-12 12:41 UTC (permalink / raw)
  To: igt-dev

We're little bit too enthusiastic in our initial attempt to lock all
available memory. Let's use the mlock probe from lib rather than trying
to lock everything that sysinfo.freeram has to offer.
Note that we're only tweaking the initial step - it's still possible
that we're going to get killed later on.

v2: Just increment lock instead of modifying addr passed to mlock

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/eviction_common.c | 54 ++++++++++++++++-------------------------
 1 file changed, 21 insertions(+), 33 deletions(-)

diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index 300eb03d..8535dfca 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -133,47 +133,33 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops,
 			      uint64_t surface_size,
 			      uint64_t surface_count)
 {
-	unsigned int *can_mlock;
-	uint64_t sz, pin;
+	void *mem;
+	uint64_t sz, pin_total;
 
 	intel_require_memory(surface_count, surface_size, CHECK_RAM);
 
 	sz = surface_size*surface_count;
-	pin = intel_get_avail_ram_mb();
-	pin *= 1024 * 1024;
-	igt_require(pin > sz);
-	pin -= sz;
+	pin_total = intel_get_total_pinnable_mem();
+	igt_require(pin_total > sz);
 
-	igt_debug("Pinning [%'lld, %'lld] MiB\n",
-		  (long long)pin/(1024*1024),
-		  (long long)(pin + sz)/(1024*1024));
-
-	can_mlock = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
-	igt_assert(can_mlock != MAP_FAILED);
+	mem = mmap(NULL, pin_total, PROT_READ, MAP_SHARED | MAP_ANON, -1, 0);
+	igt_assert(mem != MAP_FAILED);
 
 	igt_fork(child, 1) {
-		void *locked;
-
-		locked = malloc(pin + sz);
-		if (locked != NULL && !mlock(locked, pin + sz))
-			*can_mlock = 1;
-	}
-	igt_waitchildren();
-	igt_require(*can_mlock);
-	munmap(can_mlock, 4096);
-
-	igt_fork(child, 1) {
-		void *locked;
 		uint32_t *bo;
 		uint64_t n;
 		int ret;
+		size_t lock = pin_total - sz;
 
-		bo = malloc(surface_count*sizeof(*bo));
+		bo = malloc(surface_count * sizeof(*bo));
 		igt_assert(bo);
+		lock -= ALIGN(surface_count * sizeof(*bo), 4096);
 
-		locked = malloc(pin);
-		if (locked == NULL || mlock(locked, pin))
-			exit(ENOSPC);
+		igt_debug("Locking %'"PRIu64" B (%'"PRIu64" MiB)\n",
+			  lock, lock >> 20);
+		igt_assert(!mlock(mem, lock));
+		igt_info("Locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
+			 lock, lock >> 20);
 
 		for (n = 0; n < surface_count; n++)
 			bo[n] = ops->create(fd, surface_size);
@@ -188,17 +174,19 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops,
 			 * our pages into memory), start a memory hog to
 			 * force evictions.
 			 */
-
-			locked = malloc(surface_size);
-			if (locked == NULL || mlock(locked, surface_size))
-				free(locked);
+			lock += surface_size;
+			igt_assert(!mlock(mem, lock));
+			igt_debug("Total locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
+				  lock,
+				  lock >> 20);
 		}
 
 		for (n = 0; n < surface_count; n++)
 			ops->close(fd, bo[n]);
 	}
-
 	igt_waitchildren();
+
+	munmap(mem, pin_total);
 }
 
 static int swapping_evictions(int fd, struct igt_eviction_test_ops *ops,
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing
  2018-06-12 12:41 [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Michał Winiarski
  2018-06-12 12:41 ` [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock Michał Winiarski
@ 2018-06-12 13:28 ` Ewelina Musial
  2018-06-12 14:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] " Patchwork
  2018-06-12 18:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Ewelina Musial @ 2018-06-12 13:28 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: igt-dev

On Tue, Jun 12, 2018 at 02:41:28PM +0200, Michał Winiarski wrote:
> We already have the routine we need in drv_suspend. Let's move it to lib
> and use it in the mlocking tests. We can also make it a bit faster if we
> tweak the initial step and initial amount.
> (I think it's safe to assume assume that we should be able to lock 3/4

s/assume assume/assume

Reviewed-by: Ewelina Musial <ewelina.musial@intel.com>
- Ewelina

> of RAM, this cuts the probe time on my 32G SKL - from ~530s to ~180s)
> 
> v2: Use available mem, amend step, also lock outside of fork,
>     early exit if the assumption is wrong (Chris)
>     Update the function name in doc (Ewelina)
> v3: Total for pin, available for initial lock (Chris)
> 
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ewelina Musial <ewelina.musial@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  lib/igt_aux.h       |  1 +
>  lib/intel_os.c      | 57 +++++++++++++++++++++++++++++++++++++++++++++
>  tests/drv_suspend.c | 44 +++++++++-------------------------
>  3 files changed, 69 insertions(+), 33 deletions(-)
> 
> diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> index 0eb96e44..9a962881 100644
> --- a/lib/igt_aux.h
> +++ b/lib/igt_aux.h
> @@ -209,6 +209,7 @@ void intel_purge_vm_caches(int fd);
>  uint64_t intel_get_avail_ram_mb(void);
>  uint64_t intel_get_total_ram_mb(void);
>  uint64_t intel_get_total_swap_mb(void);
> +size_t intel_get_total_pinnable_mem(void);
>  
>  int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
>  			 uint64_t *out_required, uint64_t *out_total);
> diff --git a/lib/intel_os.c b/lib/intel_os.c
> index f7ad05ac..e82173b3 100644
> --- a/lib/intel_os.c
> +++ b/lib/intel_os.c
> @@ -183,6 +183,63 @@ intel_get_total_swap_mb(void)
>  	return retval / (1024*1024);
>  }
>  
> +/**
> + * intel_get_total_pinnable_mem:
> + *
> + * Compute the amount of memory that we're able to safely lock.
> + * Note that in order to achieve this, we're attempting to repeatedly lock more
> + * and more memory, which is a time consuming process.
> + *
> + * Returns: Amount of memory that can be safely pinned, in bytes.
> + */
> +size_t
> +intel_get_total_pinnable_mem(void)
> +{
> +	uint64_t *can_mlock, pin, avail;
> +	size_t ret;
> +
> +	pin = (intel_get_total_ram_mb() + 1) << 20;
> +	avail = (intel_get_avail_ram_mb() + 1) << 20;
> +
> +	can_mlock = mmap(NULL, pin, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> +	igt_require(can_mlock != MAP_FAILED);
> +
> +	/*
> +	 * We can reasonably assume that we should be able to lock at
> +	 * least 3/4 of available RAM
> +	 */
> +	*can_mlock = (avail >> 1) + (avail >> 2);
> +	if (mlock(can_mlock, *can_mlock)) {
> +		*can_mlock = 0;
> +		goto out;
> +	}
> +
> +	for (uint64_t inc = 1024 << 20; inc >= 4 << 10; inc >>= 2) {
> +		igt_debug("Testing mlock %'"PRIu64" B (%'"PRIu64" MiB)\n",
> +			  *can_mlock, *can_mlock >> 20);
> +
> +		igt_fork(child, 1) {
> +			for (uint64_t bytes = *can_mlock;
> +			     bytes <= pin;
> +			     bytes += inc) {
> +				if (mlock(can_mlock, bytes))
> +					break;
> +
> +				*can_mlock = bytes;
> +				__sync_synchronize();
> +			}
> +		}
> +		__igt_waitchildren();
> +		igt_assert(!mlock(can_mlock, *can_mlock));
> +	}
> +
> +out:
> +	ret = *can_mlock;
> +	munmap(can_mlock, pin);
> +
> +	return ret;
> +}
> +
>  static uint64_t vfs_file_max(void)
>  {
>  	static long long unsigned max;
> diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c
> index 9a9ff200..b4212dca 100644
> --- a/tests/drv_suspend.c
> +++ b/tests/drv_suspend.c
> @@ -163,52 +163,30 @@ test_sysfs_reader(bool hibernate)
>  static void
>  test_shrink(int fd, unsigned int mode)
>  {
> -	uint64_t *can_mlock, pin;
> +	void *mem;
> +	size_t size;
>  
>  	gem_quiescent_gpu(fd);
>  	intel_purge_vm_caches(fd);
>  
> -	pin = (intel_get_total_ram_mb() + 1) << 20;
> -
> -	igt_debug("Total memory %'"PRIu64" B (%'"PRIu64" MiB)\n",
> -		  pin, pin >> 20);
> -	can_mlock = mmap(NULL, pin, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> -	igt_require(can_mlock != MAP_FAILED);
> -
> -	/* Lock all the system memory, forcing the driver into swap and OOM */
> -	for (uint64_t inc = 64 << 20; inc >= 4 << 10; inc >>= 1) {
> -		igt_debug("Testing+ %'"PRIu64" B (%'"PRIu64" MiB)\n",
> -			  *can_mlock, *can_mlock >> 20);
> -
> -		igt_fork(child, 1) {
> -			for (uint64_t bytes = *can_mlock;
> -			     bytes <= pin;
> -			     bytes += inc) {
> -				if (mlock(can_mlock, bytes))
> -					break;
> -
> -				*can_mlock = bytes;
> -				__sync_synchronize();
> -			}
> -		}
> -		__igt_waitchildren();
> -	}
> +	size = intel_get_total_pinnable_mem();
> +	igt_require(size > 64 << 20);
> +	size -= 64 << 20;
>  
> -	intel_purge_vm_caches(fd);
> +	mem = mmap(NULL, size, PROT_READ, MAP_SHARED | MAP_ANON, -1, 0);
>  
> -	igt_require(*can_mlock > 64 << 20);
> -	*can_mlock -= 64 << 20;
> +	intel_purge_vm_caches(fd);
>  
>  	igt_debug("Locking %'"PRIu64" B (%'"PRIu64" MiB)\n",
> -		  *can_mlock, *can_mlock >> 20);
> -	igt_assert(!mlock(can_mlock, *can_mlock));
> +		  size, size >> 20);
> +	igt_assert(!mlock(mem, size));
>  	igt_info("Locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
> -		 *can_mlock, *can_mlock >> 20);
> +		 size, size >> 20);
>  
>  	intel_purge_vm_caches(fd);
>  	igt_system_suspend_autoresume(mode, SUSPEND_TEST_NONE);
>  
> -	munmap(can_mlock, pin);
> +	munmap(mem, size);
>  }
>  
>  static void
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock
  2018-06-12 12:41 ` [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock Michał Winiarski
@ 2018-06-12 13:29   ` Ewelina Musial
  0 siblings, 0 replies; 6+ messages in thread
From: Ewelina Musial @ 2018-06-12 13:29 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: igt-dev

On Tue, Jun 12, 2018 at 02:41:29PM +0200, Michał Winiarski wrote:
> We're little bit too enthusiastic in our initial attempt to lock all
> available memory. Let's use the mlock probe from lib rather than trying
> to lock everything that sysinfo.freeram has to offer.
> Note that we're only tweaking the initial step - it's still possible
> that we're going to get killed later on.
> 
> v2: Just increment lock instead of modifying addr passed to mlock
> 
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ewelina Musial <ewelina.musial@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-By: Ewelina Musial <ewelina.musial@intel.com>
- Ewelina
> ---
>  tests/eviction_common.c | 54 ++++++++++++++++-------------------------
>  1 file changed, 21 insertions(+), 33 deletions(-)
> 
> diff --git a/tests/eviction_common.c b/tests/eviction_common.c
> index 300eb03d..8535dfca 100644
> --- a/tests/eviction_common.c
> +++ b/tests/eviction_common.c
> @@ -133,47 +133,33 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops,
>  			      uint64_t surface_size,
>  			      uint64_t surface_count)
>  {
> -	unsigned int *can_mlock;
> -	uint64_t sz, pin;
> +	void *mem;
> +	uint64_t sz, pin_total;
>  
>  	intel_require_memory(surface_count, surface_size, CHECK_RAM);
>  
>  	sz = surface_size*surface_count;
> -	pin = intel_get_avail_ram_mb();
> -	pin *= 1024 * 1024;
> -	igt_require(pin > sz);
> -	pin -= sz;
> +	pin_total = intel_get_total_pinnable_mem();
> +	igt_require(pin_total > sz);
>  
> -	igt_debug("Pinning [%'lld, %'lld] MiB\n",
> -		  (long long)pin/(1024*1024),
> -		  (long long)(pin + sz)/(1024*1024));
> -
> -	can_mlock = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> -	igt_assert(can_mlock != MAP_FAILED);
> +	mem = mmap(NULL, pin_total, PROT_READ, MAP_SHARED | MAP_ANON, -1, 0);
> +	igt_assert(mem != MAP_FAILED);
>  
>  	igt_fork(child, 1) {
> -		void *locked;
> -
> -		locked = malloc(pin + sz);
> -		if (locked != NULL && !mlock(locked, pin + sz))
> -			*can_mlock = 1;
> -	}
> -	igt_waitchildren();
> -	igt_require(*can_mlock);
> -	munmap(can_mlock, 4096);
> -
> -	igt_fork(child, 1) {
> -		void *locked;
>  		uint32_t *bo;
>  		uint64_t n;
>  		int ret;
> +		size_t lock = pin_total - sz;
>  
> -		bo = malloc(surface_count*sizeof(*bo));
> +		bo = malloc(surface_count * sizeof(*bo));
>  		igt_assert(bo);
> +		lock -= ALIGN(surface_count * sizeof(*bo), 4096);
>  
> -		locked = malloc(pin);
> -		if (locked == NULL || mlock(locked, pin))
> -			exit(ENOSPC);
> +		igt_debug("Locking %'"PRIu64" B (%'"PRIu64" MiB)\n",
> +			  lock, lock >> 20);
> +		igt_assert(!mlock(mem, lock));
> +		igt_info("Locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
> +			 lock, lock >> 20);
>  
>  		for (n = 0; n < surface_count; n++)
>  			bo[n] = ops->create(fd, surface_size);
> @@ -188,17 +174,19 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops,
>  			 * our pages into memory), start a memory hog to
>  			 * force evictions.
>  			 */
> -
> -			locked = malloc(surface_size);
> -			if (locked == NULL || mlock(locked, surface_size))
> -				free(locked);
> +			lock += surface_size;
> +			igt_assert(!mlock(mem, lock));
> +			igt_debug("Total locked %'"PRIu64" B (%'"PRIu64" MiB)\n",
> +				  lock,
> +				  lock >> 20);
>  		}
>  
>  		for (n = 0; n < surface_count; n++)
>  			ops->close(fd, bo[n]);
>  	}
> -
>  	igt_waitchildren();
> +
> +	munmap(mem, pin_total);
>  }
>  
>  static int swapping_evictions(int fd, struct igt_eviction_test_ops *ops,
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib: Extract mlock probing
  2018-06-12 12:41 [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Michał Winiarski
  2018-06-12 12:41 ` [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock Michał Winiarski
  2018-06-12 13:28 ` [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Ewelina Musial
@ 2018-06-12 14:17 ` Patchwork
  2018-06-12 18:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-12 14:17 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] lib: Extract mlock probing
URL   : https://patchwork.freedesktop.org/series/44626/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4302 -> IGTPW_1449 =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1449 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1449, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/44626/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1449:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_gttfill@basic:
      fi-pnv-d510:        SKIP -> PASS

    igt@gem_mmap_gtt@basic-small-bo-tiledy:
      fi-gdg-551:         PASS -> SKIP

    
== Known issues ==

  Here are the changes found in IGTPW_1449 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_mmap_gtt@basic-small-copy:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106097)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000) +1

    
    ==== Possible fixes ====

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         FAIL (fdo#102575) -> SKIP

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      fi-glk-j4005:       FAIL (fdo#103481) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-cnl-psr:         DMESG-WARN (fdo#104951) -> PASS

    
  fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
  fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
  fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097


== Participating hosts (41 -> 37) ==

  Additional (2): fi-bdw-gvtdvm fi-skl-gvtdvm 
  Missing    (6): fi-ilk-m540 fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-skl-6700hq 


== Build changes ==

    * IGT: IGT_4513 -> IGTPW_1449

  CI_DRM_4302: ef129f260b2bd362959651fe8e20e369bf3c977e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1449: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1449/
  IGT_4513: 7b6838781441cfbc7f6c18f421f127dfb02b44cf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1449/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v3,1/2] lib: Extract mlock probing
  2018-06-12 12:41 [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Michał Winiarski
                   ` (2 preceding siblings ...)
  2018-06-12 14:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] " Patchwork
@ 2018-06-12 18:51 ` Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-12 18:51 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] lib: Extract mlock probing
URL   : https://patchwork.freedesktop.org/series/44626/
State : failure

== Summary ==

= CI Bug Log - changes from IGT_4513_full -> IGTPW_1449_full =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1449_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1449_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/44626/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1449_full:

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_frontbuffer_tracking@fbc-badstride:
      shard-snb:          PASS -> DMESG-WARN

    
    ==== Warnings ====

    igt@gem_exec_schedule@deep-blt:
      shard-kbl:          SKIP -> PASS +2

    igt@gem_mocs_settings@mocs-rc6-dirty-render:
      shard-kbl:          PASS -> SKIP +2

    igt@gem_userptr_blits@create-destroy-unsync:
      shard-snb:          PASS -> SKIP +2

    
== Known issues ==

  Here are the changes found in IGTPW_1449_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_userptr_blits@process-exit:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_flip_tiling@flip-to-y-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103822)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103167)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          PASS -> FAIL (fdo#104724, fdo#103166)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@gem_eio@suspend:
      shard-snb:          FAIL (fdo#105957) -> PASS

    igt@gem_exec_big:
      shard-hsw:          INCOMPLETE (fdo#103540) -> PASS

    igt@kms_flip@2x-flip-vs-blocking-wf-vblank:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#100368) -> PASS

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          FAIL (fdo#104724, fdo#103925) -> PASS +1

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4513 -> IGTPW_1449
    * Linux: CI_DRM_4294 -> CI_DRM_4302

  CI_DRM_4294: af0889384edc6de2f91494325d571c66dffea83f @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4302: ef129f260b2bd362959651fe8e20e369bf3c977e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1449: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1449/
  IGT_4513: 7b6838781441cfbc7f6c18f421f127dfb02b44cf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1449/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-12 18:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 12:41 [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Michał Winiarski
2018-06-12 12:41 ` [igt-dev] [PATCH i-g-t v3 2/2] igt/evictions: Avoid getting killed by the reaper in mlock Michał Winiarski
2018-06-12 13:29   ` Ewelina Musial
2018-06-12 13:28 ` [igt-dev] [PATCH i-g-t v3 1/2] lib: Extract mlock probing Ewelina Musial
2018-06-12 14:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] " Patchwork
2018-06-12 18:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.