sleep/wake-up timeout issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have a unexpected issue that related in sleep/wake-up timeout for task, while device driver develop.
my code use kernel function 'wait_for_
I expected this function 'wait_for_
so result of have additional test, the additionally delayed time is different, but the result is the same.
additionally delayed time range was random in 1ms ~ 11seconds.
this issue occur in kernel function 'msleep(255 * 1000)' too... because schedule_timeout() used in 'wait_for_
※A additionally delayed time occurs even if a different number is entered like 1ms or 1seconds..
I think it "additionally delayed time" was mean that wake-up task but time to task racing until active run in cpu. am i guessing right? or not am i doing something wrong?
If my thoughts are right, How do I get the correct time?
Below is the sample code I tested.
struct completion cmp;
static long g_jiffies = 0;
static int _open(struct inode *inode, struct file *file)
{
init_
g_jiffies = 0;
return 0;
}
static ssize_t _read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos)
{
long sch = 0;
reinit_
printk(
g_jiffies = jiffies;
sch = wait_for_
//msleep(255 * 1000)
printk(
return 0;
}
result dmesg :
[목 1월 6 13:05:30 2022] start checking
[목 1월 6 13:09:52 2022] delay time = 261808
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Bug reporting is about finding & fixing problems thus preventing future users from hitting the same bug.
I suspect a Support site would be more appropriate, eg. https:/ /answers. launchpad. net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http:// loco.ubuntu. com/ or asking at https:/ /askubuntu. com or https:/ /ubuntuforums. org, or for more support options please look at https:/ /discourse. ubuntu. com/t/community -support/ 709 Please note: You may require a specialist programming site rather than generic Ubuntu support.