All of lore.kernel.org
 help / color / mirror / Atom feed
* [1.50][PATCH 0/2] review request
@ 2021-05-06  1:34 Anuj Mittal
  2021-05-06  1:34 ` [1.50][PATCH 1/2] runqueue: Fix multiconfig deferred task sstate validity caching issue Anuj Mittal
  2021-05-06  1:34 ` [1.50][PATCH 2/2] runqueue: Handle deferred task rehashing in multiconfig builds Anuj Mittal
  0 siblings, 2 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-06  1:34 UTC (permalink / raw)
  To: bitbake-devel

Please review these changes for 1.50/hardknott.

Thanks,

Anuj

The following changes since commit 14c5f0735947307b9d69c57f7334fefaea7311b3:

  bitbake: tests/fetch: remove write protected files too (2021-04-27 15:22:30 +0100)

are available in the Git repository at:

  git://push.openembedded.org/bitbake-contrib stable/1.50-next

Richard Purdie (2):
  runqueue: Fix multiconfig deferred task sstate validity caching issue
  runqueue: Handle deferred task rehashing in multiconfig builds

 lib/bb/runqueue.py | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

-- 
2.30.2


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

* [1.50][PATCH 1/2] runqueue: Fix multiconfig deferred task sstate validity caching issue
  2021-05-06  1:34 [1.50][PATCH 0/2] review request Anuj Mittal
@ 2021-05-06  1:34 ` Anuj Mittal
  2021-05-06  1:34 ` [1.50][PATCH 2/2] runqueue: Handle deferred task rehashing in multiconfig builds Anuj Mittal
  1 sibling, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-06  1:34 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

We were testing the validity of deferred tasks setscene status "up front" which
is very unlikely to succeed and leads to cache invalidation issues. With the
change to rebuild the deferred task list, this status becomes out of sync. The
result was tasks being executed when they should not have been leading to extra
work for the build unnecessarily.

Instead, don't process validity status for deferred tasks and assume their
data will become available. If it doesn't, this will now result in a build
error as the setscene task will fail and the main task will run instead.

In theory we could try and track the state changes in the deferred list and
re-test validity then but I'm not sure it is worth the effort when the other
code path and errors in setscene tasks will give a pretty good idea of what
is happening anyway.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit edcafac13b3b241b6687419e59018d21811507a1)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/runqueue.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index feb42d3e6..78e576eb2 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2030,8 +2030,6 @@ class RunQueueExecute:
                             logger.debug("%s didn't become valid, skipping setscene" % nexttask)
                             self.sq_task_failoutright(nexttask)
                             return True
-                        else:
-                            self.sqdata.outrightfail.remove(nexttask)
                     if nexttask in self.sqdata.outrightfail:
                         logger.debug2('No package found, so skipping setscene task %s', nexttask)
                         self.sq_task_failoutright(nexttask)
@@ -2827,6 +2825,8 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
             sqdata.stamppresent.remove(tid)
         if tid in sqdata.valid:
             sqdata.valid.remove(tid)
+        if tid in sqdata.outrightfail:
+            sqdata.outrightfail.remove(tid)
 
         noexec, stamppresent = check_setscene_stamps(tid, rqdata, rq, stampcache, noexecstamp=True)
 
@@ -2861,10 +2861,10 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
             if tid in sqrq.scenequeue_covered:
                 continue
 
-            sqdata.outrightfail.add(tid)
-
             h = pending_hash_index(tid, rqdata)
             if h not in sqdata.hashes:
+                if tid in tids:
+                    sqdata.outrightfail.add(tid)
                 sqdata.hashes[h] = tid
             else:
                 sqrq.sq_deferred[tid] = sqdata.hashes[h]
-- 
2.30.2


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

* [1.50][PATCH 2/2] runqueue: Handle deferred task rehashing in multiconfig builds
  2021-05-06  1:34 [1.50][PATCH 0/2] review request Anuj Mittal
  2021-05-06  1:34 ` [1.50][PATCH 1/2] runqueue: Fix multiconfig deferred task sstate validity caching issue Anuj Mittal
@ 2021-05-06  1:34 ` Anuj Mittal
  1 sibling, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-06  1:34 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

If the hash of a task changes and that hash is a deferred task (e.g. a multiconfig
build), we need to ensure that the hash change propagates through to all the tasks
else the build will run multiple copies of the task, sometimes with oddly differing
results as the outhashes of native tasks built in differing locations can confuse
things.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2db571324f755edc4981deecbcfdf0aaa5a97627)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/runqueue.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 78e576eb2..6c41fe6d4 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2294,10 +2294,16 @@ class RunQueueExecute:
             self.updated_taskhash_queue.remove((tid, unihash))
 
             if unihash != self.rqdata.runtaskentries[tid].unihash:
-                hashequiv_logger.verbose("Task %s unihash changed to %s" % (tid, unihash))
-                self.rqdata.runtaskentries[tid].unihash = unihash
-                bb.parse.siggen.set_unihash(tid, unihash)
-                toprocess.add(tid)
+                # Make sure we rehash any other tasks with the same task hash that we're deferred against.
+                torehash = [tid]
+                for deftid in self.sq_deferred:
+                    if self.sq_deferred[deftid] == tid:
+                        torehash.append(deftid)
+                for hashtid in torehash:
+                    hashequiv_logger.verbose("Task %s unihash changed to %s" % (hashtid, unihash))
+                    self.rqdata.runtaskentries[hashtid].unihash = unihash
+                    bb.parse.siggen.set_unihash(hashtid, unihash)
+                    toprocess.add(hashtid)
 
         # Work out all tasks which depend upon these
         total = set()
-- 
2.30.2


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

* [1.50][PATCH 0/2] review request
@ 2021-07-06  8:30 Anuj Mittal
  0 siblings, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-07-06  8:30 UTC (permalink / raw)
  To: bitbake-devel

Please review these changes for 1.50/hardknott.

Thanks,

Anuj

The following changes since commit 0c83e98b0b4129e43e05129074fff60b22a9f2eb:

  server/process: Handle error in heartbeat funciton in OOM case (2021-05-20 21:40:00 +0100)

are available in the Git repository at:

  git://push.openembedded.org/bitbake-contrib stable/1.50-next

Harald Brinkmann (1):
  fetch/svn: Fix parsing revision of SVN repos with redirects

Scott Weaver (1):
  fetch2: add check for empty SRC_URI hash string

 lib/bb/fetch2/__init__.py | 5 ++++-
 lib/bb/fetch2/svn.py      | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-07-06  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06  1:34 [1.50][PATCH 0/2] review request Anuj Mittal
2021-05-06  1:34 ` [1.50][PATCH 1/2] runqueue: Fix multiconfig deferred task sstate validity caching issue Anuj Mittal
2021-05-06  1:34 ` [1.50][PATCH 2/2] runqueue: Handle deferred task rehashing in multiconfig builds Anuj Mittal
2021-07-06  8:30 [1.50][PATCH 0/2] review request Anuj Mittal

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.