LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-16-2011, 09:54 AM   #1
alonp
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Rep: Reputation: 0
Increasing stack size to 16K on x86_64 2.6.18 kernel


Hi,

I am trying to increase the stack size of a 2.6.18 kernel x86_64 to 16K by changing:

-#define THREAD_ORDER 1
+#define THREAD_ORDER 2
#ifdef __ASSEMBLY__
#define THREAD_SIZE (1 << (PAGE_SHIFT + HREAD_ORDER))

When the system goes up all seems fine but my driver started crashing when calling vfree:

void vfree(void *addr)
{
BUG_ON(in_interrupt());
__vunmap(addr, 1);
}

Do I need to change anything else?
It seems that in_interrupt returns TRUE.

Thanks in advance,
Alon
 
Old 02-16-2011, 02:38 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
What's your thread context, kernel thread, software interrupt or hardware interrupt when vfree is called?
 
Old 02-16-2011, 11:39 PM   #3
alonp
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Original Poster
Rep: Reputation: 0
The code is running in ioctl context, the interesting thing here is the my code checks the return value of in_interrupt just before calling vfree so I won't fail calling it.
 
Old 02-17-2011, 02:47 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
I don't think stack size increase cause the issue. You can use kmalloc/kfree instead of vmalloc/vfree.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
driverloader installation problem of 16K stack size wahaha Fedora 1 08-06-2006 02:02 AM
upgrading kernel stack from 4k to 16K wahaha Linux - Newbie 6 07-16-2006 10:52 AM
16K stack size in 2.6..xx quietguy47 Linux - Kernel 3 04-24-2006 01:21 PM
Increasing Kernel stack size to 8k without recompiling the Kernel deathman Linux - Software 2 04-08-2006 04:39 AM
Is Kernel-ntfs for 16k stack available for download? mdslf Linux - General 0 08-18-2004 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration