From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC v4][PATCH part-1 5/7] mm/asi: Exit/enter ASI when task enters/exits scheduler
Date: Tue, 05 May 2020 09:26:37 +0800 [thread overview]
Message-ID: <202005050913.0AxDrwa9%lkp@intel.com> (raw)
In-Reply-To: <20200504144939.11318-6-alexandre.chartre@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 7218 bytes --]
Hi Alexandre,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/x86/asm]
[also build test ERROR on tip/x86/core v5.7-rc4]
[cannot apply to tip/x86/mm next-20200504]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alexandre-Chartre/ASI-Part-I-ASI-Infrastructure-and-PTI/20200505-074555
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2ce0d7f9766f0e49bb54f149c77bae89464932fb
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel//sched/core.c: In function '__schedule':
>> kernel//sched/core.c:4022:3: error: implicit declaration of function 'asi_schedule_out'; did you mean '__schedule_bug'? [-Werror=implicit-function-declaration]
asi_schedule_out(current);
^~~~~~~~~~~~~~~~
__schedule_bug
>> kernel//sched/core.c:4111:3: error: implicit declaration of function 'asi_schedule_in'; did you mean '__schedule'? [-Werror=implicit-function-declaration]
asi_schedule_in(current);
^~~~~~~~~~~~~~~
__schedule
cc1: some warnings being treated as errors
vim +4022 kernel//sched/core.c
3968
3969 /*
3970 * __schedule() is the main scheduler function.
3971 *
3972 * The main means of driving the scheduler and thus entering this function are:
3973 *
3974 * 1. Explicit blocking: mutex, semaphore, waitqueue, etc.
3975 *
3976 * 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return
3977 * paths. For example, see arch/x86/entry_64.S.
3978 *
3979 * To drive preemption between tasks, the scheduler sets the flag in timer
3980 * interrupt handler scheduler_tick().
3981 *
3982 * 3. Wakeups don't really cause entry into schedule(). They add a
3983 * task to the run-queue and that's it.
3984 *
3985 * Now, if the new task added to the run-queue preempts the current
3986 * task, then the wakeup sets TIF_NEED_RESCHED and schedule() gets
3987 * called on the nearest possible occasion:
3988 *
3989 * - If the kernel is preemptible (CONFIG_PREEMPTION=y):
3990 *
3991 * - in syscall or exception context, at the next outmost
3992 * preempt_enable(). (this might be as soon as the wake_up()'s
3993 * spin_unlock()!)
3994 *
3995 * - in IRQ context, return from interrupt-handler to
3996 * preemptible context
3997 *
3998 * - If the kernel is not preemptible (CONFIG_PREEMPTION is not set)
3999 * then at the next:
4000 *
4001 * - cond_resched() call
4002 * - explicit schedule() call
4003 * - return from syscall or exception to user-space
4004 * - return from interrupt-handler to user-space
4005 *
4006 * WARNING: must be called with preemption disabled!
4007 */
4008 static void __sched notrace __schedule(bool preempt)
4009 {
4010 struct task_struct *prev, *next;
4011 unsigned long *switch_count;
4012 struct rq_flags rf;
4013 struct rq *rq;
4014 int cpu;
4015
4016 /*
4017 * If the task is using ASI then exit it right away otherwise the
4018 * ASI will likely quickly fault, for example when accessing run
4019 * queues.
4020 */
4021 if (IS_ENABLED(CONFIG_ADDRESS_SPACE_ISOLATION))
> 4022 asi_schedule_out(current);
4023
4024 cpu = smp_processor_id();
4025 rq = cpu_rq(cpu);
4026 prev = rq->curr;
4027
4028 schedule_debug(prev, preempt);
4029
4030 if (sched_feat(HRTICK))
4031 hrtick_clear(rq);
4032
4033 local_irq_disable();
4034 rcu_note_context_switch(preempt);
4035
4036 /*
4037 * Make sure that signal_pending_state()->signal_pending() below
4038 * can't be reordered with __set_current_state(TASK_INTERRUPTIBLE)
4039 * done by the caller to avoid the race with signal_wake_up().
4040 *
4041 * The membarrier system call requires a full memory barrier
4042 * after coming from user-space, before storing to rq->curr.
4043 */
4044 rq_lock(rq, &rf);
4045 smp_mb__after_spinlock();
4046
4047 /* Promote REQ to ACT */
4048 rq->clock_update_flags <<= 1;
4049 update_rq_clock(rq);
4050
4051 switch_count = &prev->nivcsw;
4052 if (!preempt && prev->state) {
4053 if (signal_pending_state(prev->state, prev)) {
4054 prev->state = TASK_RUNNING;
4055 } else {
4056 deactivate_task(rq, prev, DEQUEUE_SLEEP | DEQUEUE_NOCLOCK);
4057
4058 if (prev->in_iowait) {
4059 atomic_inc(&rq->nr_iowait);
4060 delayacct_blkio_start();
4061 }
4062 }
4063 switch_count = &prev->nvcsw;
4064 }
4065
4066 next = pick_next_task(rq, prev, &rf);
4067 clear_tsk_need_resched(prev);
4068 clear_preempt_need_resched();
4069
4070 if (likely(prev != next)) {
4071 rq->nr_switches++;
4072 /*
4073 * RCU users of rcu_dereference(rq->curr) may not see
4074 * changes to task_struct made by pick_next_task().
4075 */
4076 RCU_INIT_POINTER(rq->curr, next);
4077 /*
4078 * The membarrier system call requires each architecture
4079 * to have a full memory barrier after updating
4080 * rq->curr, before returning to user-space.
4081 *
4082 * Here are the schemes providing that barrier on the
4083 * various architectures:
4084 * - mm ? switch_mm() : mmdrop() for x86, s390, sparc, PowerPC.
4085 * switch_mm() rely on membarrier_arch_switch_mm() on PowerPC.
4086 * - finish_lock_switch() for weakly-ordered
4087 * architectures where spin_unlock is a full barrier,
4088 * - switch_to() for arm64 (weakly-ordered, spin_unlock
4089 * is a RELEASE barrier),
4090 */
4091 ++*switch_count;
4092
4093 psi_sched_switch(prev, next, !task_on_rq_queued(prev));
4094
4095 trace_sched_switch(preempt, prev, next);
4096
4097 /* Also unlocks the rq: */
4098 rq = context_switch(rq, prev, next, &rf);
4099 } else {
4100 rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP);
4101 rq_unlock_irq(rq, &rf);
4102 }
4103
4104 balance_callback(rq);
4105
4106 /*
4107 * Now the task will resume execution, we can safely return to
4108 * its ASI if one was in used.
4109 */
4110 if (IS_ENABLED(CONFIG_ADDRESS_SPACE_ISOLATION))
> 4111 asi_schedule_in(current);
4112 }
4113
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 8513 bytes --]
next prev parent reply other threads:[~2020-05-05 1:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 14:49 [RFC v4][PATCH part-1 0/7] ASI - Part I (ASI Infrastructure and PTI) Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 1/7] mm/x86: Introduce kernel Address Space Isolation (ASI) Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 2/7] mm/asi: ASI entry/exit interface Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 3/7] mm/asi: Improve TLB flushing when switching to an ASI pagetable Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 4/7] mm/asi: Interrupt ASI on interrupt/exception/NMI Alexandre Chartre
2020-05-05 9:26 ` kbuild test robot
2020-05-06 7:36 ` [mm/asi] c13d1a6ed3: BUG:scheduling_while_atomic kernel test robot
2020-05-06 7:36 ` kernel test robot
2020-05-04 14:49 ` [RFC v4][PATCH part-1 5/7] mm/asi: Exit/enter ASI when task enters/exits scheduler Alexandre Chartre
2020-05-05 0:27 ` kbuild test robot
2020-05-05 1:26 ` kbuild test robot [this message]
2020-05-04 14:49 ` [RFC v4][PATCH part-1 6/7] mm/asi: ASI fault handler Alexandre Chartre
2020-05-04 14:49 ` [RFC v4][PATCH part-1 7/7] mm/asi: Implement PTI with ASI Alexandre Chartre
2020-05-05 10:58 ` kbuild test robot
2020-05-12 17:45 ` [RFC v4][PATCH part-1 0/7] ASI - Part I (ASI Infrastructure and PTI) Dave Hansen
2020-05-12 19:25 ` Alexandre Chartre
2020-05-12 20:07 ` Andy Lutomirski
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=202005050913.0AxDrwa9%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.