Re: Curious about corner case in btrfs code

2014-08-26 Thread Aruna Hewapathirane
Nick, Have a look here please: http://www.brendangregg.com/linuxperf.html Aruna On Wed, Aug 27, 2014 at 12:47 AM, nick wrote: > > > On 14-08-27 12:08 AM, valdis.kletni...@vt.edu wrote: > > On Tue, 26 Aug 2014 21:49:51 -0400, Greg Freemyer said: > >> A decade plus ago when I first got interest

Re: Curious about corner case in btrfs code

2014-08-26 Thread nick
On 14-08-27 12:08 AM, valdis.kletni...@vt.edu wrote: > On Tue, 26 Aug 2014 21:49:51 -0400, Greg Freemyer said: >> A decade plus ago when I first got interested in using xfs for a production >> system, the freeze feature would randomly fail for me. I was able to update >> the xfstest that exercis

Re: Curious about corner case in btrfs code

2014-08-26 Thread Valdis . Kletnieks
On Tue, 26 Aug 2014 21:49:51 -0400, Greg Freemyer said: > A decade plus ago when I first got interested in using xfs for a production > system, the freeze feature would randomly fail for me. I was able to update > the xfstest that exercised that code and get a reproducer. I didn't do the > actual

Re: Curious about corner case in btrfs code

2014-08-26 Thread Greg Freemyer
On August 26, 2014 8:13:10 PM EDT, Nick wrote: > > >On 08/26/2014 08:05 PM, Tobias Boege wrote: >> On Tue, 26 Aug 2014, Nick wrote: >>> On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: If it's a corner case, it won't be hit often enough right? And if >it was hit often enough, it wouldn't

Re: cdev_init and struct file_operations

2014-08-26 Thread Valdis . Kletnieks
On Tue, 26 Aug 2014 20:48:41 -0400, John de la Garza said: > In the book Linux Device Drivers a struct cdev is setup like this: > > static void scull_setup_cdev(struct scull_dev *dev, int index) > { > int err, devno = MKDEV(scull_major, scull_minor + index); > > cdev_init(&dev->cdev, &scull

cdev_init and struct file_operations

2014-08-26 Thread John de la Garza
In the book Linux Device Drivers a struct cdev is setup like this: static void scull_setup_cdev(struct scull_dev *dev, int index) { int err, devno = MKDEV(scull_major, scull_minor + index); cdev_init(&dev->cdev, &scull_fops); dev->cdev.owner = THIS_MODULE; dev->cdev.ops = &scu

Re: Curious about corner case in btrfs code

2014-08-26 Thread Nick
On 08/26/2014 08:37 PM, Tobias Boege wrote: > On Tue, 26 Aug 2014, Nick wrote: >> On 08/26/2014 08:05 PM, Tobias Boege wrote: >>> On Tue, 26 Aug 2014, Nick wrote: On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: > If it's a corner case, it won't be hit often enough right? And if it > wa

Re: Curious about corner case in btrfs code

2014-08-26 Thread Tobias Boege
On Tue, 26 Aug 2014, Nick wrote: > On 08/26/2014 08:05 PM, Tobias Boege wrote: > > On Tue, 26 Aug 2014, Nick wrote: > >> On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: > >>> If it's a corner case, it won't be hit often enough right? And if it > >>> was hit often enough, it wouldn't be corner case!?

Re: Curious about corner case in btrfs code

2014-08-26 Thread Valdis . Kletnieks
On Tue, 26 Aug 2014 20:13:10 -0400, Nick said: > From reading the code off the bat, seems to not need to be written as this > case is rarely meet for large files > or files that are huge and take a lot of time to write. Nope. Same exact logic for small files. The code is doing "Don't bother tr

Re: Curious about corner case in btrfs code

2014-08-26 Thread Nick
On 08/26/2014 08:05 PM, Tobias Boege wrote: > On Tue, 26 Aug 2014, Nick wrote: >> On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: >>> If it's a corner case, it won't be hit often enough right? And if it >>> was hit often enough, it wouldn't be corner case!? :) >>> >>> These 2 are mutually exclusive

Re: Curious about corner case in btrfs code

2014-08-26 Thread Tobias Boege
On Tue, 26 Aug 2014, Nick wrote: > On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: > > If it's a corner case, it won't be hit often enough right? And if it > > was hit often enough, it wouldn't be corner case!? :) > > > > These 2 are mutually exclusive! > > > > > > On Tue, Aug 26, 2014 at 3:47 PM,

Re: Curious about corner case in btrfs code

2014-08-26 Thread Mandeep Sandhu
Then setup a test system which will reproduce hitting this corner case and instrument your code to see is there's any gain at all. On Tue, Aug 26, 2014 at 4:14 PM, Nick wrote: > > > On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: >> If it's a corner case, it won't be hit often enough right? And i

Re: Curious about corner case in btrfs code

2014-08-26 Thread Valdis . Kletnieks
On Tue, 26 Aug 2014 18:47:41 -0400, Nick said: > After reading through the code in inode.c today , I am curious about the > comment and the following code I will paste > below. I am curious if this corner case is hit often enough for me to write a > patch to improve the speed of this > corner cas

Re: Curious about corner case in btrfs code

2014-08-26 Thread Nick
On 08/26/2014 06:58 PM, Mandeep Sandhu wrote: > If it's a corner case, it won't be hit often enough right? And if it > was hit often enough, it wouldn't be corner case!? :) > > These 2 are mutually exclusive! > > > On Tue, Aug 26, 2014 at 3:47 PM, Nick wrote: >> After reading through the code

Re: Curious about corner case in btrfs code

2014-08-26 Thread Mandeep Sandhu
If it's a corner case, it won't be hit often enough right? And if it was hit often enough, it wouldn't be corner case!? :) These 2 are mutually exclusive! On Tue, Aug 26, 2014 at 3:47 PM, Nick wrote: > After reading through the code in inode.c today , I am curious about the > comment and the f

Curious about corner case in btrfs code

2014-08-26 Thread Nick
After reading through the code in inode.c today , I am curious about the comment and the following code I will paste below. I am curious if this corner case is hit often enough for me to write a patch to improve the speed of this corner case. Furthermore , compress_file_range is the function nam

Re: Workflow improvements when sending patches with format-patch && send-email ?

2014-08-26 Thread Laurent Navet
Hi, have a look at https://github.com/raphaelsc/Generate-GIT-send-mail-arguments maybe a good base for your workflow. Laurent, -- « On ne résout pas un problème avec les modes de pensée qui l’ont engendré. » « You cannot solve current problems with current thinking. Current problems are the res

Workflow improvements when sending patches with format-patch && send-email ?

2014-08-26 Thread Matthias Beyer
Hi, I have a problem related to my workflow when patching kernel sources. What I do by now, when sending patches: scripts/get_maintainer.pl --file my/patched/file.c git format-patch -s -n --cover-letter # and then appending _every single mail from the get_maintainer.pl # call wit

Re: values from pci_dev or read from config space - pci

2014-08-26 Thread Oscar Salvador
Thanks ;)! I didn't find it. Kind regards 2014-08-26 15:39 GMT+02:00 : > On Tue, 26 Aug 2014 08:33:18 +0200, Oscar Salvador said: > >> If I get the IRQ from the pci_dev, I get a X, but if I get the IRQ >> from the config space, I get another different number Y. >> >> Would be you so kind to expl

Re: values from pci_dev or read from config space - pci

2014-08-26 Thread Valdis . Kletnieks
On Tue, 26 Aug 2014 08:33:18 +0200, Oscar Salvador said: > If I get the IRQ from the pci_dev, I get a X, but if I get the IRQ > from the config space, I get another different number Y. > > Would be you so kind to explain: > > 1- Why it's better use the values stored in pci_dev structure instead >

Re: Need help understanding the logic of __cpuidle_set_driver

2014-08-26 Thread Daniel Lezcano
On 08/15/2014 12:20 PM, Mohammad Merajul Islam Molla wrote: > Hello, > > I was looking into the code of drivers/cpuidle/driver.c. I have some > doubts regarding the implementation of __cpuidle_set_driver function > when CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is defined. > > If CONFIG_CPU_IDLE_MULTIPLE_DR

Re: Writing makefiles for headers outside 'usr/include'

2014-08-26 Thread testlaster
Alright soo I want to access a piece of allocated memory through the PCI device which is PLX9054 chip. All I really need to do is gain access to it and dump the data from it into a file. Now the user space one would have been nice if I could use it but the PCI.H in user space dev folder " /usr/i

Re: Writing makefiles for headers outside 'usr/include'

2014-08-26 Thread Anders Darander
On 26 August 2014 10:09, testlaster wrote: > So the initial problem I'm having is that wanting to use headers and their > libs like module.h and init.d and pci.h for instance can't be used by simply > going #include because if you check the actual pci.h (40 lines or > so) file you will find that

Writing makefiles for headers outside 'usr/include'

2014-08-26 Thread testlaster
So the initial problem I'm having is that wanting to use headers and their libs like|module.h|and|init.d|and|pci.h|for instance can't be used by simply going|#include |because if you check the actual|pci.h|||(40 lines or so) file you will find that its allot shorter then the usual dev|pci.h| so