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]
Message-ID: <202406290712.UllPC1Yc-lkp@intel.com>
Date: Sat, 29 Jun 2024 07:29:24 +0800
From: kernel test robot <lkp@...el.com>
To: Xavier <xavier_qy@....com>, mingo@...hat.com, peterz@...radead.org,
	juri.lelli@...hat.com, vincent.guittot@...aro.org
Cc: oe-kbuild-all@...ts.linux.dev, dietmar.eggemann@....com,
	rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
	bristot@...hat.com, vschneid@...hat.com,
	linux-kernel@...r.kernel.org, Xavier <xavier_qy@....com>
Subject: Re: [PATCH-RT sched v1 1/2] RT SCHED: Optimize the enqueue and
 dequeue operations for rt_se

Hi Xavier,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on shuah-kselftest/next shuah-kselftest/fixes peterz-queue/sched/core linus/master v6.10-rc5 next-20240628]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Xavier/RT-SCHED-Optimize-the-enqueue-and-dequeue-operations-for-rt_se/20240628-211332
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/20240627172156.235421-2-xavier_qy%40163.com
patch subject: [PATCH-RT sched v1 1/2] RT SCHED: Optimize the enqueue and dequeue operations for rt_se
config: openrisc-allnoconfig
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build):

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406290712.UllPC1Yc-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/sched/build_policy.c:45:
   kernel/sched/rt.c: In function 'dequeue_rt_stack':
>> kernel/sched/rt.c:1560:35: error: 'struct sched_rt_entity' has no member named 'parent'
    1560 |                         if (!rt_se->parent) {
         |                                   ^~
   kernel/sched/rt.c:1575:35: error: 'struct sched_rt_entity' has no member named 'parent'
    1575 |                         if (!rt_se->parent)
         |                                   ^~
   kernel/sched/rt.c: In function 'enqueue_rt_entity':
   kernel/sched/rt.c:1616:30: error: 'struct sched_rt_entity' has no member named 'parent'
    1616 |                 rt_se = rt_se->parent;
         |                              ^~
   kernel/sched/rt.c: In function 'dequeue_rt_entity':
   kernel/sched/rt.c:1662:30: error: 'struct sched_rt_entity' has no member named 'parent'
    1662 |                 rt_se = rt_se->parent;
         |                              ^~


vim +1560 kernel/sched/rt.c

  1473	
  1474	/*
  1475	 * To optimize the enqueue and dequeue of rt_se, this strategy employs a
  1476	 * bottom-up removal approach. Specifically, when removing an rt_se at a
  1477	 * certain level, if it is determined that the highest priority of the rq
  1478	 * associated with that rt_se has not changed, there is no need to continue
  1479	 * removing rt_se at higher levels. At this point, only the total number
  1480	 * of removed rt_se needs to be recorded, and the rt_nr_running count of
  1481	 * higher-level rq should be removed accordingly.
  1482	 *
  1483	 * For enqueue operations, if an rt_se at a certain level is in the rq,
  1484	 * it is still necessary to check the priority of the higher-level rq.
  1485	 * If the priority of the higher-level rq is found to be lower than that
  1486	 * of the rt_se to be added, it should be removed, as updating the highest
  1487	 * priority of the rq during addition will cause the rq to be repositioned
  1488	 * in the parent rq.
  1489	 *
  1490	 * Conversely, for dequeue operations, if an rt_se at a certain level is
  1491	 * not in the rq, the operation can be exited immediately to reduce
  1492	 * unnecessary checks and handling.
  1493	 *
  1494	 * The return value refers to the last rt_se that was removed for enqueue
  1495	 * operations. And for dequeue operations, it refers to the last rt_se
  1496	 * that was either removed or had its rt_nr_running updated.
  1497	 */
  1498	static struct sched_rt_entity *dequeue_rt_stack(struct sched_rt_entity *rt_se,
  1499							unsigned int flags, int for_enqueue)
  1500	{
  1501		struct sched_rt_entity *last = rt_se;
  1502		struct sched_rt_entity *origin = rt_se;
  1503		unsigned int del_rt_nr = 0;
  1504		unsigned int del_rr_nr = 0;
  1505		int prio_changed = rt_se_prio(rt_se);
  1506		int sub_on_rq = 1;
  1507	
  1508		for_each_sched_rt_entity(rt_se) {
  1509			if (on_rt_rq(rt_se)) {
  1510				if (sub_on_rq) {
  1511					/*
  1512					 * The number of tasks removed from the sub-level rt_se also needs
  1513					 * to be subtracted from the rq of the current rt_se, as the current
  1514					 * rt_se's rq no longer includes the number of removed tasks.
  1515					 */
  1516					dec_rq_nr_running(rt_se, del_rt_nr, del_rr_nr);
  1517	
  1518					if (prio_changed) {
  1519						/*
  1520						 * If the removal of the lower-level rt_se causes the
  1521						 * highest priority of the current rq to change, then the
  1522						 * current rt_se also needs to be removed from its parent
  1523						 * rq, and the number of deleted tasks should be
  1524						 * accumulated.
  1525						 */
  1526						del_rt_nr += rt_se_nr_running(rt_se);
  1527						del_rr_nr += rt_se_rr_nr_running(rt_se);
  1528						prio_changed = __dequeue_rt_entity(rt_se,
  1529										prio_changed, flags);
  1530						last = rt_se;
  1531					} else if (!for_enqueue) {
  1532						/* For dequeue, last may only rt_nr_running was modified.*/
  1533						last = rt_se;
  1534					}
  1535				} else {
  1536					/*
  1537					 * Entering this branch must be for enqueue, as dequeue would break
  1538					 * if an rt_se is not online.
  1539					 * If the sub-level node is not online, and the current rt_se's
  1540					 * priority is lower than the one being added, current rt_se need
  1541					 * to be removed.
  1542					 */
  1543					prio_changed = rt_se_prio(rt_se);
  1544					if (prio_changed > rt_se_prio(origin)) {
  1545						del_rt_nr += rt_se_nr_running(rt_se);
  1546						del_rr_nr += rt_se_rr_nr_running(rt_se);
  1547						prio_changed = __dequeue_rt_entity(rt_se,
  1548										prio_changed, flags);
  1549						last = rt_se;
  1550					} else {
  1551						prio_changed = 0;
  1552					}
  1553				}
  1554	
  1555				/*
  1556				 * If the current rt_se is on the top rt_rq, then the already deleted
  1557				 * nodes, plus the count of the rt_rq where current rt_se located,
  1558				 * need to be removed from the top_rt_rq.
  1559				 */
> 1560				if (!rt_se->parent) {
  1561					dequeue_top_rt_rq(rt_rq_of_se(rt_se),
  1562							del_rt_nr + rt_rq_of_se(rt_se)->rt_nr_running);
  1563				}
  1564				sub_on_rq = 1;
  1565			} else if (for_enqueue) {
  1566				/*
  1567				 * In the case of an enqueue operation, if a certain level is found to be
  1568				 * not online, then the previous counts need to be reset to zero.
  1569				 */
  1570				prio_changed = 0;
  1571				sub_on_rq = 0;
  1572				del_rt_nr = 0;
  1573				del_rr_nr = 0;
  1574	
  1575				if (!rt_se->parent)
  1576					dequeue_top_rt_rq(rt_rq_of_se(rt_se),
  1577							rt_rq_of_se(rt_se)->rt_nr_running);
  1578			} else {
  1579				last = rt_se;
  1580				break;
  1581			}
  1582		}
  1583	
  1584		return last;
  1585	}
  1586	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

View attachment "reproduce" of type "text/plain" (709 bytes)

View attachment "config" of type "text/plain" (24091 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ