From: MingJie Chang <mingjie.tw@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: how to cope with "Scheduling in interrupt" problem
Date: Mon, 4 Apr 2005 13:38:16 +0800 [thread overview]
Message-ID: <8b46b8f105040322385695aee3@mail.gmail.com> (raw)
Dear all,
I try to modify inet_sendmsg() and inet_recvmsg().
To defer the time to notify a receiver, I use a timer for the problem.
But it causes "Scheduling in interrupt" error.
Is there any method to reform it?
Thank you for tour help
Scheduling in interrupt
invalid operand: 0000
CPU: 0
EIP: 0819:[<c0005d6f>] Not tainted
EFLAGS: 00010286
eax: 00000018 ebx: c19c2000 ecx: c0170894 edx: fbff9000
esi: c19c2000 edi: c1d42da0 ebp: c19c3cf4 esp: c19c3cd0
ds: 0821 es: 0821 ss: 0821
Process ftp (pid: 1312, stackpage=c19c3000)<1>
EX:
inet_sendmsg()
{
.
.
.
BYE:
if(sock->send_nonnotify_size>0&&0==sock->send_set_timer)
{
sock->send_notify_timer.function=notify_receiver;
sock->send_notify_timer.expires=MY_EXT_NOTIFY_TIME + jiffies;
sock->send_notify_timer.data=(unsigned long)(sock);
dbprintk("set notify timer, sock addr=%p\n",sock);
add_timer(&sock->send_notify_timer);
sock->send_set_timer=1;
}
release_sock(sock->sk);
}
static void notify_receiver(unsigned long data)
{
struct socket* sock=(struct socket*)data;
struct SHM_INFO shm_tmp;
if(!sock||!sock->sk)
return;
lock_sock(sock->sk);
sock->send_set_timer=0;
if(sock->send_nonnotify_size)
{
dbprintk("notify_receiver:notify
receivers,size=%d\n",sock->send_nonnotify_size);
sock->send_nonnotify_size=0;
shm_tmp.saddr=ntohl(sock->sk->saddr);
shm_tmp.sport=ntohl(sock->sk->sport);
shm_tmp.reqaddr=shm_tmp.saddr;
shm_tmp.reqport=shm_tmp.sport;
shm_tmp.daddr=ntohl(sock->sk->daddr);
shm_tmp.dport=ntohl(sock->sk->dport);
shm_tmp.maddr=NULL;
release_sock(sock->sk);
dbprintk("notift_recv: call send_data()......");
HYPERVISOR_send_data(&shm_tmp);
dbprintk("done\n");
return;
}
release_sock(sock->sk);
}
next reply other threads:[~2005-04-04 5:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-04 5:38 MingJie Chang [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-04 5:51 how to cope with "Scheduling in interrupt" problem MingChieh
2005-04-04 4:40 MingJie Chang
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=8b46b8f105040322385695aee3@mail.gmail.com \
--to=mingjie.tw@gmail.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox