Re: what is the difference between kmalloc and vmalloc?
kmalloc allocates physically contiguous memory, while vmalloc allocates memory which is only virtually contiguous and not necessarily physically contiguous. Usually physically contiguous memory is required for hardware devices (dma etc) , thus kmalloc is useful for allocating such memory. And though this is not always the requirement, still kmalloc is preferred , because it is better in terms of performance, because vmalloc can result in greater TLB thrashing . vmalloc is useful when very large amounts of memory is to be allocated, because when memory becomes heavily fragmented, you may not get success while allocating large memory via kmalloc. Slab layer serves like a cache for commonly used data structures, again with a view to reduce fragmentation, and to speed up operations. To allocate objects from slab you will have to use functions like kmem_cache_create() and kmem_cache_alloc() .. thanks Vivek On Thu, Nov 22, 2012 at 8:42 AM, horse_rivers wrote: > > thanks! > > ___ > 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:Re: Re: Re: problem with kernel make in debian
>don't top post, ok? :) ok:) >And good luck. Don't forget to share your progress, ok? ;) of cource! as you say,the current gcc do not support some code, for example : 1. inline asm code form 2. CFLAG can not pass to subdirs my process is continuing . :) BestRegards! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the difference between kmalloc and vmalloc?
On Thu, Nov 22, 2012 at 10:12 AM, horse_rivers wrote: > thanks! kmalloc allocates memory from slab cache. It tends to be physically contigous and you can get memory size smaller than page size. vmalloc, on the other hand, is when you need only virtually contigous memory area. Example of such usage is for allocating memory to load kernel module. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Re: Re: problem with kernel make in debian
Hi :) On Wed, Nov 21, 2012 at 10:42 AM, horse_rivers wrote: > > thank you ! > > I have got a 0.11 version kernel which has been modified to be compatible > for the current version of toolchain? > > and I think I can also do this work for 1.0 version ! don't top post, ok? :) And good luck. Don't forget to share your progress, ok? ;) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
what is the difference between kmalloc and vmalloc?
thanks! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: driver questions
On Wed, Nov 21, 2012 at 1:11 PM, Christopher Biessener wrote: > I have searched using google for information regarding linux driver > development and have found a lot, but not the answers to these questions: > * Can 2 different kernel drivers access the same device at the same time? > * Is every driver known as a kernel module? > > Basically I need advice on if I can and how to sidestep some of the > libata device calls. We do not want to replace the entire libata, just > some of it. libata is extremely extensible in exactly that fashion. When you define a new driver the templates define pointers to default routines that do everything as far as interacting with the hardware. If you only want to replace one routine, then you just write your new routine and update the pointer to point to your routine and not the default one. > We have a custom piece of hardware that writes to hard > drives. When we use another one of our devices to act as the host the > client device runs at full speed. When we run the python GUI with our > custom C++ extension using only SATA ports on the motherboard the > program runs at full speed. But when we use the python GUI to drive our > custom hardware we lose 40% of the speed. We believe the speed loss to > be in how libata optimizes how it sends commands/data to the hard > drive/device. That sounds more invasive than I expected. I'm not 100% sure if that will be as easy as I described or not. I would take a look at some of the libata drivers that override some of the routines and see if you have the flexibility you need. If not, the libata mailing list is pretty quite these days. Just ask questions there about what you want to do. The main libata devs are Jeff Garzik, Heo Tejun, and Alan Cox so answers from any of them should be authoritative. It may be that a more modular approach may need to be implemented. If so, I suspect they will cooperate assuming at the end you will add your code to the main kernel tree. "IDE/ATA development list" , As with most lkml list, subscribing is not required to post and reply-all is the default user behavior. > Thanks in advance, > > Christopher Good Luck Greg ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Question about applying a kernel patch with "git am" received from a mailing list
On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote: > Hi, > I am following some kernel mailing lists (netdev and others). > I want to be able to save recent patches and to apply the against a git tree. > > I tried using MUTT client for this. I save the patch (which is almost > always inline). Try the following, it worked for me: - "tag" the patchset and "tag-save" or "tag-copy" it into one file - run: git am patchset.name BTW, everyone working with git should try StGit ("stacked git"), it's quite a useful tool. HTH, Jonathan Neuschäfer ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
driver questions
I have searched using google for information regarding linux driver development and have found a lot, but not the answers to these questions: * Can 2 different kernel drivers access the same device at the same time? * Is every driver known as a kernel module? Basically I need advice on if I can and how to sidestep some of the libata device calls. We do not want to replace the entire libata, just some of it. We have a custom piece of hardware that writes to hard drives. When we use another one of our devices to act as the host the client device runs at full speed. When we run the python GUI with our custom C++ extension using only SATA ports on the motherboard the program runs at full speed. But when we use the python GUI to drive our custom hardware we lose 40% of the speed. We believe the speed loss to be in how libata optimizes how it sends commands/data to the hard drive/device. Thanks in advance, Christopher ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Question about applying a kernel patch with "git am" received from a mailing list
Hi, Josh, Thanks again! While your suggestion works, it has some disadvantages; maybe you/someone can advice: 1) In the case when I want to apply a series of patches, let's say a patchset of 10 patches, does this mean that I should run "pipe git am" on each of them ? 2) Even this is the case; suppose I apply 10 patches. Then I make some tests, and want to return to the original tree, (by git reset --hard) and after a day or say again apply these patches (or some of them) I should go into mutt, browse the list of messages and find them, and then apply them, etc... Is there no way to save patches and then "git am" the patches without these error ? I heard that mutt is very popular for working with patches. Such a feature seems natural to me. rgs Kevin On Tue, Nov 20, 2012 at 8:02 PM, Josh Cartwright wrote: > On Tue, Nov 20, 2012 at 07:53:57PM +0200, Kevin Wilson wrote: >> On Tue, Nov 20, 2012 at 7:39 PM, Josh Cartwright wrote: >> > On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote: >> > > Hi, >> > > I am following some kernel mailing lists (netdev and others). >> > > I want to be able to save recent patches and to apply the against a git >> > > tree. >> > > >> > > I tried using MUTT client for this. I save the patch (which is almost >> > > always inline). >> > > >> > > Then I run >> > > git apply --check patchName >> > > and >> > > git apply patchName >> > > and it applies cleanly. >> > > >> > > But if I try: >> > > git am patchName >> > > >> > > It gives >> > > "Patch format detection failed." >> > > >> > > Any recommendation what to do to apply a patch >> > > with "git am"? >> > >> > Kevin- >> > >> > Just use mutt's 'pipe-message' feature, which is bound to '|' by >> > default. Pipe the message directly to 'git am'. >> >> Hi, >> Thanks for the quick response! I press "|" , I want to pipe to the >> git tree (which is /work/src/net-next). How do I tell pipe that the >> path of git tree is there? > > Simple! > > Instead of piping to 'git am', pipe to 'cd /work/src/net-next && git am'. > > Alternatively, run mutt from your source tree. > >Josh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Managing linux-next tree for submitting patches
Kumar amit mehta wrote: >On Wed, Nov 21, 2012 at 02:47:15AM -0500, devendra.aaru wrote: >> that maintainer's tree is next tree so that next can pickup. once >the >> next pics up your changes gets merged there in next. >> >> always its good to work against' maintainers trees, if its a fix then >> its better work on the maintainer's torvalds's tree otherwise the >next >> tree in maintainer's repo >In past, I've been advised to base my work against linux-next tree. >See the mail [1] from Greg K H. > >[1] http://www.spinics.net/lists/newbies/msg46076.html > The linux kernel is too big with too many maintains for one simple rule to work. Linux-next is an aggregator for lots of maintainer trees. In many/most cases it is a good place to work. But some subsystems have their own trees where they test out patches for a while before sending the patches to linux-next. For those the maintainer may require the patches apply to their tree, not linux-next. Ext4 is an example of subsystem with 2 or 3 patch preparation trees. You have to know which tree to work against. No easy answer i know of. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Managing linux-next tree for submitting patches
On Wed, Nov 21, 2012 at 02:47:15AM -0500, devendra.aaru wrote: > that maintainer's tree is next tree so that next can pickup. once the > next pics up your changes gets merged there in next. > > always its good to work against' maintainers trees, if its a fix then > its better work on the maintainer's torvalds's tree otherwise the next > tree in maintainer's repo In past, I've been advised to base my work against linux-next tree. See the mail [1] from Greg K H. [1] http://www.spinics.net/lists/newbies/msg46076.html ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies