Re: Linux 2.6 Scheduling

2008-06-18 Thread Scott Lovenberg
Nobin Mathew wrote: Hi Friends, I am trying to learn Linux Kernel Internals, and I am going through Robert Love's Book Linux Kernel Development. I have a doubt regarding Linux process scheduling. In the example given in the book, text editor and video encoder have different priorities.

Linux 2.6 Scheduling

2008-06-18 Thread Nobin Mathew
Hi Friends, I am trying to learn Linux Kernel Internals, and I am going through Robert Love's Book Linux Kernel Development. I have a doubt regarding Linux process scheduling. In the example given in the book, text editor and video encoder have different priorities. Text Editor has higher prior

Re: list of fuctions defined and exported by a library

2008-06-18 Thread Peter Teoh
Welldo some experiment yourselfand let us know the results First( mine is FC5): /mnt/hd0>gdb /lib/libcap.so (gdb) info functions All defined functions: Non-debugging symbols: 0x002a78d8 _init 0x002a7900 [EMAIL PROTECTED] 0x002a7960 [EMAIL PROTECTED] 0x002a7990 [EMAIL PROTECTED] 0

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Miller
From: David Woodhouse <[EMAIL PROTECTED]> Date: Thu, 19 Jun 2008 00:15:56 +0100 > Solving that problem was step #1 in the process of converting drivers to > use request_firmware(). You _have_ to be able to build the firmware into > the kernel image, and you _can_. Fair enough. I'll step back and

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Woodhouse
On Wed, 2008-06-18 at 16:05 -0700, David Miller wrote: > Tell me this, how can I (with the default config option settings) > netboot properly without an initial ramdisk after these tg3 patches > and still get the proper firmware? I suppose the facetious answer is that you can't, just as you can't

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Miller
From: David Woodhouse <[EMAIL PROTECTED]> Date: Wed, 18 Jun 2008 23:49:54 +0100 > We believe they _are_ solved, so if you still see problems then > please actually point them out rather than just spreading FUD. Tell me this, how can I (with the default config option settings) netboot properly wit

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Miller
From: David Woodhouse <[EMAIL PROTECTED]> Date: Wed, 18 Jun 2008 23:26:51 +0100 > On Wed, 2008-06-18 at 16:53 -0400, David S. Miller wrote: > > And NACK on this patch. > > For what reason? Something that worked previously with no effort on the user's part now will not work automatically as it sh

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Woodhouse
On Wed, 2008-06-18 at 15:42 -0700, David Miller wrote: > And the default is to not use the in-kernel copy. > > At least how things were previously, the dists had to at least think > about patching out firmware and actually make a decision here. > > Now they can just turn off their brains with the

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Miller
From: David Woodhouse <[EMAIL PROTECTED]> Date: Wed, 18 Jun 2008 23:39:41 +0100 > It merely adds the _option_ to load it from userspace, as is recommended > practice for current drivers. And the default is to not use the in-kernel copy. At least how things were previously, the dists had to at le

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Woodhouse
On Wed, 2008-06-18 at 15:32 -0700, David Miller wrote: > From: David Woodhouse <[EMAIL PROTECTED]> > Date: Wed, 18 Jun 2008 23:26:51 +0100 > > > On Wed, 2008-06-18 at 16:53 -0400, David S. Miller wrote: > > > And NACK on this patch. > > > > For what reason? > > Something that worked previously w

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Woodhouse
On Wed, 2008-06-18 at 16:53 -0400, David S. Miller wrote: > From: Jaswinder Singh <[EMAIL PROTECTED]> > Date: Wed, 18 Jun 2008 19:58:33 +0530 > > > Firmware blob is big-endian starts with version numbers, > > followed by start address and length. > > length = end_address_of_bss - start_address_o

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David S. Miller
From: Jaswinder Singh <[EMAIL PROTECTED]> Date: Wed, 18 Jun 2008 19:58:33 +0530 > Firmware blob is big-endian starts with version numbers, > followed by start address and length. > length = end_address_of_bss - start_address_of_text. > Remainder is the blob to be loaded contiguously from start a

Re: Containers - what are they?

2008-06-18 Thread Peter Teoh
Sorry, I just have a new question or comment. Will it be possible to use this containers architecture, to enable us to migrate the entire group of processes from one machine to another? Or am I confusing it with CONFIG_NAMESPACES? The application of this is in Google's search engine cluster - wh

Polling in kernel threads

2008-06-18 Thread Lukas Razik
Hello! I develop a network interface driver and I've the following issue... I create a kernel thread which has the following thread handler: static int com_thread( void *data ) { daemonize( "comthread" ); allow_signal( SIGTERM ); while( !signal_pending(current) ) { if(receive(...)) {

Re: A interesting problem of C programming

2008-06-18 Thread Jose Celestino
Words by vaibhav khatavkar [Wed, Jun 18, 2008 at 04:24:31PM +0530]: > Hi Wang Yu , > > I saw ur code ... > > > > > > > > char > > *p; > > > > p = > > 0; > > > > *printf("%s", > > p); > > > > printf("\n"); * > > > > > In ur first code snippet "%s" prints string loc

Re: [PATCH] firmware: convert tg3 driver to request_firmware()

2008-06-18 Thread David Woodhouse
On Wed, 2008-06-18 at 10:54 -0400, Jeff Garzik wrote: > It just makes the patch longer and more difficult to read and review > with the two separate changes mushed together. Having separate patches > also means it is easier to test and validate the loadable firmware approach. In this _particula

Re: Containers - what are they?

2008-06-18 Thread Peter Teoh
Thank you Mulyadi and Li Zefan - I shall start thinking about the implications of these ideas..Linux kernel is a spring well of new ideas... -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to [EMAIL PROTECTED] Please read the FAQ at http://kernelnewbies.org

Re: Containers - what are they?

2008-06-18 Thread Mulyadi Santosa
Hi Li.. On Wed, Jun 18, 2008 at 1:44 PM, Li Zefan <[EMAIL PROTECTED]> wrote: > That's cpu subsystem - fair group scheduler. You can try it with a new kernel: ># mount -t cgroup -o cpu xxx /mnt > > But it's soft limit not hard limit, I mean, if you limit a group's cpu time > to 20%, > it c

Re: ioctl argument

2008-06-18 Thread Bernd Petrovitsch
On Mit, 2008-06-18 at 14:29 +0200, Belisko Marek wrote: > Hi, > > How to pass an array of char via ioctl (not via write method ) to > kernel from user space? > I define unigue IOCTL cmd > > #define LED_SET_STATE _IOW(LED_MAGIC,1, leds) > > and leds should be an array from userspace. In the

ioctl argument

2008-06-18 Thread Belisko Marek
Hi, How to pass an array of char via ioctl (not via write method ) to kernel from user space? I define unigue IOCTL cmd #define LED_SET_STATE _IOW(LED_MAGIC,1, leds) and leds should be an array from userspace. Thank's in advance Marek I -- Marek Beliško Ruská Nová Ves 219 08005 Prešov Slovak

Re: A interesting problem of C programming

2008-06-18 Thread shreeram
Hi Trying to dereference a NULL pointer gives you a segmentation fault. Do not try to do this in kernel space. Doing so will lead to kernel panic. Wang Yu wrote: Hi, all I have the following code: #include

Re: A interesting problem of C programming

2008-06-18 Thread vaibhav khatavkar
Hi , On Wed, Jun 18, 2008 at 4:44 PM, Wang Yu <[EMAIL PROTECTED]> wrote: > > > On Wed, Jun 18, 2008 at 6:54 PM, vaibhav khatavkar < > [EMAIL PROTECTED]> wrote: > >> Hi Wang Yu , >> >> I saw ur code ... >> >> >>> >>> >>> char >>> *p; >>> >>> p = >>> 0; >>> >>> *printf("%s",

Re: A interesting problem of C programming

2008-06-18 Thread Wang Yu
On Wed, Jun 18, 2008 at 6:54 PM, vaibhav khatavkar < [EMAIL PROTECTED]> wrote: > Hi Wang Yu , > > I saw ur code ... > > >> >> >> char >> *p; >> >> p = >> 0; >> >> *printf("%s", >> p); >> >> printf("\n"); * >> >> > In ur first code snippet "%s" prints string located

Re: A interesting problem of C programming

2008-06-18 Thread shreeram
Hi Try to leave a space between the format and newline tab and get the ouput. Wang Yu wrote: Hi, all I have the following code: #include

Re: A interesting problem of C programming

2008-06-18 Thread ershaad ahamed
A quick google got me this http://www.ciselant.de/projects/gcc_printf/gcc_printf.html seems its a feature of gcc. In certain circumstances it optimizes the printf call to a puts call. While printf behaves nicely and prints '(null)' when you pass it a null pointer, puts doesnt do that. From the doc

Re: A interesting problem of C programming

2008-06-18 Thread Luciano Rocha
On Wed, Jun 18, 2008 at 05:52:20PM +0800, Wang Yu wrote: > Hi, all > I have the following code: > char *p = 0; > printf("%s", p); Using a NULL pointer with %s format isn't portable nor defined. Don't do that... -- Luciano Rocha <[EMAIL PROTECTED]> Eurotux Informática, S.A.

Re: A interesting problem of C programming

2008-06-18 Thread Bernd Petrovitsch
On Mit, 2008-06-18 at 16:14 +0530, ershaad ahamed wrote: > A quick google got me this > http://www.ciselant.de/projects/gcc_printf/gcc_printf.html > > seems its a feature of gcc. In certain circumstances it optimizes the > printf call to a puts call. While printf behaves nicely and prints s/print

Re: A interesting problem of C programming

2008-06-18 Thread vaibhav khatavkar
Hi Wang Yu , I saw ur code ... > > > char > *p; > > p = > 0; > > *printf("%s", > p); > > printf("\n"); * > > In ur first code snippet "%s" prints string located at p .. and thats null .. so we get output null ... (Note that : there are 2 printf statements) > > T

Re: A interesting problem of C programming

2008-06-18 Thread ajit mote
Hello all, i tried the given code snippet and found 'null' output both the time ... compiled and run using gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) ... Regards, Ajit Mote. On Wed, Jun 18, 2008 at 3:22 PM, Wang Yu <[EMAIL PROTECTED]> wrote: > Hi, all > I have the following code

A interesting problem of C programming

2008-06-18 Thread Wang Yu
Hi, all I have the following code: #include int main() { char *p; p = 0; *printf("%s", p); printf("\n"); * return 0; } The out put is *(null)* But, if I change into: #include int main() { char *p; p = 0; * printf("%s\n", p); * return