Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Kamil Konieczny" <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t v2 2/3] lib/igt_device_scan: change device list variable visibility
Date: Thu, 23 Jan 2025 10:52:07 +0100	[thread overview]
Message-ID: <20250123095208.72984-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20250123095208.72984-1-zbigniew.kempczynski@intel.com>

In commit: 2e8f3e06fb (tests/xe_evict|exec_threads: Use fd reopen
to avoid corrupting global data) I simply changed tests which
corrupted device list global variable. i915 didn't use opening
devices in multithreaded tests but this changed with xe.

Device scan is now unconditional so we may change device list
variable visibility to TLS. With this reverting of above commit
should be safe (but I'm not sure is it worth to do this).

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
 lib/igt_device_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index 44b632008b..c36b0efa90 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -247,7 +247,7 @@ struct igt_device {
 };
 
 /* Scanned devices */
-static struct {
+static __thread struct {
 	struct igt_list_head all;
 	struct igt_list_head filtered;
 	bool devs_scanned;
-- 
2.34.1


  parent reply	other threads:[~2025-01-23  9:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23  9:52 [PATCH i-g-t v2 0/3] Drop device scan cache logic Zbigniew Kempczyński
2025-01-23  9:52 ` [PATCH i-g-t v2 1/3] lib/igt_device_scan: drop " Zbigniew Kempczyński
2025-01-23 17:25   ` Lucas De Marchi
2025-01-23  9:52 ` Zbigniew Kempczyński [this message]
2025-01-24 16:26   ` [PATCH i-g-t v2 2/3] lib/igt_device_scan: change device list variable visibility Kamil Konieczny
2025-01-27  4:49     ` Zbigniew Kempczyński
2025-01-27 15:31       ` Lucas De Marchi
2025-01-27 15:37         ` Zbigniew Kempczyński
2025-01-27 16:08           ` Lucas De Marchi
2025-01-23  9:52 ` [PATCH i-g-t v2 3/3] tests/xe_intel_bb: check multithreading rescans won't segfault Zbigniew Kempczyński
2025-01-24 16:28   ` Kamil Konieczny
2025-01-27  4:50     ` Zbigniew Kempczyński
2025-01-23 10:36 ` ✓ i915.CI.BAT: success for Drop device scan cache logic (rev2) Patchwork
2025-01-23 11:15 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-23 23:13 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-27  4:55   ` Zbigniew Kempczyński
2025-01-24  3:29 ` ✗ i915.CI.Full: " Patchwork
2025-01-27  4:59   ` Zbigniew Kempczyński

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250123095208.72984-3-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox