How to add a block into blkio.throttle.io_service*?
Hi everybody, I'm having some problems to understand how to add a block device into blkio.throttle.* . Being more specific, I cannot see my block listed into blkio.throttle.io_serviced. An example... I'm running docker with a loopback device attached: $ docker run -ti --device=/dev/loop16:/dev/loop16 fedora:latest bash I can see it listed and included: $ cat /sys/fs/cgroup/blkio/docker/2db640bc7bb28a3b6bf83dd7b7c0f146b4433e3ed5dfa6899f8498f9a19c52c5/blkio.throttle.io_serviced 7:16 Read 34 7:16 Write 0 7:16 Sync 34 7:16 Async 0 7:16 Discard 0 7:16 Total 34 8:0 Read 417 8:0 Write 0 8:0 Sync 417 8:0 Async 0 8:0 Discard 0 8:0 Total 417 Total 451 But how can I add it properly into my cgroup path? I know that you need to enable block into that cgroup. But it is not working for me. It works if I reset blkio.throttle.write_bps_device and other fields: # echo 0 > /sys/fs/cgroup/blkio/mypath/blkio.throttle.write_bps_device I don't know if it is right. Does anyone know how to do it properly? Thanks! -- Julio Cesar Faracco ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Should I specify the mount type every time? What are the recommendations...?
Hi guys, I want your opinion about a syscall: mount(). Today, a problem brought back this doubt. I see a lots of code that calls/uses mount() syscall. But, recently, running Valgrind, it showed an error saying that you cannot specify NULL as the 'type' argument of mount function. An example from kernel code: ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL); Valgrind was complaining about the first NULL parameter which refers to the mount type: ==18012== Syscall param mount(type) points to unaddressable byte(s) After replacing NULL to type "none" the error disappeared. I read a documentation about it, saying that is better to use "none" for BIND and MOVE options. But, I'm not right about that. Do you have any documentation or a best practice to use this syscall? Thanks! -- Julio Cesar Faracco ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: I have a large patch in the 2000 lines. What to do?
I believe that it was answered. What is the recommendation when I change a structure in a include file and this change causes a lots of new changes, for example? Julio Cesar Faracco 2015-10-10 11:14 GMT-03:00 Greg KH : > On Sat, Oct 10, 2015 at 08:02:49AM +0700, Ivan Safonov wrote: >> On 10/10/2015 02:20 AM, Greg KH wrote: >> >On Fri, Oct 09, 2015 at 12:12:44PM -0700, Anish Kumar wrote: >> >> >> >>>On Oct 9, 2015, at 11:45 AM, Ivan Safonov wrote: >> >>> >> >>>Hi! >> >>> >> >>>I have a large patch in the 2000 lines, which replaces the macro BITn to >> >>>BIT(n) in multiple files. >> >>I will recommend sending RFC patch first and >> >>Get the community comments. >> >No, we just ignore RFC patches, we have too many "real" patches to deal >> >with. >> > >> >>If they like your patch then divide the patch based on logic rather than >> >>lines of codes. >> >>>Is it worth to split this patch into several parts? >> >Yes. >> > >> >>>Is it sufficient to place the changes in each file in a separate part of >> >>>patchset? >> >Make it one-patch-per-driver. >> > >> >But note, cleanup patches like this are usually ignored by most >> >subsystems, be aware that this type of thing is only usually accepted in >> >the drivers/staging/ portion of the kernel. >> > >> >good luck! >> > >> >greg k-h >> >> The catch is that this patch is only to one driver. > > You know, providing specifics is always nice when asking questions... > > If it's just one driver, and you think the patch is correct, just send > it in as normal, in one patch, as it should be "easy" to understand. > > But again, remember that these types of "cleanups" are not always > appreciated for some portions of the kernel (again, you were not > specific so I can't be specific back...) > > greg k-h > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Testing network kernel module
Hi everyone. Does anyone know a good way to test the tx_timeout function from the net_device_ops struct? In other words, I want to force a timeout exception to check if my code is doing what I expect. To test it, I'm avoiding the clean up of the output buffer. So, when the buffer is full the module throws a timeout exception. But, I'm not right if it is the right way to test it or simulate a timeout. Suggestions? Thanks! *--* *Julio Cesar Faracco* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Where is the source code of udev?
Hi everybody. Where can I find the updated source code of udev? I'm cloning the source from here: http://git.kernel.org/cgit/linux/hotplug/udev.git/ Is it right? Thanks! -- *Julio Cesar Faracco* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to force my usb mouse using a kernel module created by myself?
Hi Bobby! Yes, you're right! I did the task, but I cannot prove to myself if my module works! I tryed udev rules and I read the chapter 14. But no progess... That article is so useful to me. Thanks! =) *Julio Cesar Faracco* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
How to force my usb mouse using a kernel module created by myself?
Hi everyone! It's a dumb question, but is not working with me. Does anybody knows how to force my usb mouse using a kernel module created by myself? When I plug my mouse it need to load my module and not the generic one. Thanks! *Julio Cesar Faracco* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Writing kernel in C
Hi Saurabh! This is a project of a friend of mine. It called TempOS. It is a kernel for educational purpose too. http://tempos-project.org/ The project is listed in OSDev Wiki too. http://wiki.osdev.org/Projects Att, -- Julio Cesar Faracco University of São Paulo - Brazil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Eudyptula Challenge
Hi Greg. Maybe the system is overloaded again. =/ The last task I sent was answered in five days. Don't worry and wait. Is there anyone who is facing the same thing? Thanks. -- Julio Cesar Faracco University of São Paulo - Brazil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [Eudyptula Challenge] Not receiving tasks.
Finally, I received a new task. Eudyptula is working again I guess. Julio Cesar Faracco University of São Paulo - Brazil Em 16/05/2014 18:51, "Kai Bojens" escreveu: > > > On 16. Mai 2014 16:06:12 MESZ, Sudip Mukherjee > wrote: > > > I will start it next week. I was thinking of taking two usb keyboards > >and finding out the common udev events between them. > > Please do not take the fun out of the challenge by discussing its > solutions on the list. I have enjoyed the tasks so far and would like to > solve them by myself. > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [Eudyptula Challenge] Not receiving tasks.
Hi Eduardo! I'm having the same problem in the same task! I haven't received tasks and results since last Sunday! Julio Cesar Faracco University of São Paulo - Brazil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Learning to write kernel modules
There is a free on-line version of that book, Narendra. https://lwn.net/Kernel/LDD3/ I will suggest "Professional Linux Kernel Architecture" by Wolfgang Mauerer too. I don't know if an on-line version, but it's a good book. -- Julio Cesar Faracco University of São Paulo - Brazil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernel Projects
Thanks Greg K-H and Greg Freemyer. You gave me helpful tips to start. Att, -- *Julio Cesar Faracco* *University of São Paulo - Brazil* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Kernel Projects
Hi, Does anybody know if there is a program to offer small (or big) kernel projects to students or someone who are interested in? I'm looking for programs like Google Summer of Code or http://kernelnewbies.org/KernelProjects I'm interested to contribute with kernel patches, but I don't know how and where to start it. I will be glad if someone give me ideas and/or suggestions. Thanks! *--* *Julio Cesar Faracco* *University of São Paulo - Brazil* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies