View previous topic :: View next topic |
Author |
Message |
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Sun Apr 02, 2017 3:24 pm Post subject: Linux module related questions [Solved] |
|
|
Alright so I have a few questions.
1) I have built most of the required modules into the kernel itself so output of lsmod is pretty much empty. I've used the command 'make localyesconfig' while building the kernel. Is that a good idea? What are the pros and cons?
2) Since the modules are built into the kernel, trying to get more information about the related parameters fails. For example 'modinfo -p ath9k' reports 'Module ath9k not found'. How do I get this to work locally other than looking at online documentation. I understand that the currently set parameters can be viewed using 'systool -av -m [module name]' command, but that's not what I'm interested in.
3) I've been using ath9k module for my Atheros wireless card without the paramater 'nohwcrypt=1' set, which is recommended according to Arch Wiki. I've no disconnect issues, bandwidth also seems to be okay so far but would 'nohwcrypt=1' parameter improve the performance? What would you recommend?
4) What are some good resources to look at online if I'm interested in tweaking kernel for performance or in general to get a better understanding of compiling kernel.
Sorry for so many questions, please bear with me
Edit-1:
Okay, I've found the answer to Question#3. Looks like pretty significant improvement, watching video with mpv & monitoring bandwidth I can clearly see that there's no lag and reaches the full bandwidth capacity after adding 'ath9k.nohwcrypt=1' to boot parameter.
Last edited by irenicus09 on Mon Apr 03, 2017 10:42 am; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Apr 03, 2017 1:48 am Post subject: Re: Linux module related questions |
|
|
irenicus09 wrote: | 1) I have built most of the required modules into the kernel itself so output of lsmod is pretty much empty. I've used the command 'make localyesconfig' while building the kernel. Is that a good idea? What are the pros and cons? |
irenicus09 ... imo the only good reason for having all drivers built in is if you want to disable module loading (ie, if you're running a server and want to remove that as a possible attack surface). For other usage then modules make sense, I have three wireless drivers, only one of which I ever use (but others are there as I can then use the two USB wireless devices I have if need be), similarly with other stuffs I use only occasionally (like filesystem drivers, network filesystems, fuse, loop, pktcdvd, firewire, etc, etc), these I build as modules, and load as and when needed. Other considerations are that as modules these can then be provided 'options' via /etc/modprobe.d (and so reduce parameters on the kernel command line), can be unloaded on suspend/hibernate (some, few, drivers do have issues ITR), reduction in size (and memory) the kernel occupies (boot is only 200M), wireless drivers (and/or firmware) and other drivers can exhibit bugs and so being able to rmmod/modprobe may be useful (or in some cases needed), i915 won't provide a framebuffer at boot (for some reason) and needs to be built as a module (and loaded later in the boot process). In short, building *some* drivers as modules is probably more flexible than building everything in ... unless you're concerned about reducing this as a potential attack surface, or, perhaps, want to remove sys-apps/kmod as a dependency. Oh, and as you noticed, modules allow modinfo to function ;)
irenicus09 wrote: | 3) I've been using ath9k module for my Atheros wireless card without the paramater 'nohwcrypt=1' set, which is recommended according to Arch Wiki. I've no disconnect issues, bandwidth also seems to be okay so far but would 'nohwcrypt=1' parameter improve the performance? What would you recommend? |
I think that's entirely a driver issue (by all accounts ath9k ... and ath10k ... are not well coded, and require closed firmwares), you would expect that hwcrypt would improve throughput, but I expect that this doesn't function correctly because Atheros either didn't take the time to understand the underlying kernel API (and so have the fw, or driver take advantage of it), and/or figured that having everyone work with only half a view of what the driver is doing (due to the presence of firmware) was going to work out in practice (there is a good breakdown of this by the ath5k author, who eventually gave up working with Atheros after the ath9k/ath10k driver development became impossible for that, and other, reasons).
irenicus09 wrote: | 4) What are some good resources to look at online if I'm interested in tweaking kernel for performance or in general to get a better understanding of compiling kernel. |
Well, the kernel-seeds page (sorry, I'm not sure where it is right now) covers some aspects of this (though I don't think its any more that 50% complete). Otherwise there is /usr/src/linux/Documentation but that might be a lot to wade through ... I'm sure there are hundreds of sites (*cough* ... pheronix ... *cough*) with any number of suggestions (some of which you might be best not to know about).
HTH & best ... khay |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Mon Apr 03, 2017 10:42 am Post subject: |
|
|
@khayyam ...
Man you seem to have the answer to everything I asked...thanks for going through my questions and taking the time to answer.
Gracias! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54809 Location: 56N 3W
|
Posted: Mon Apr 03, 2017 10:44 am Post subject: |
|
|
irenicus09,
kernel-seeds is still at http://kernel-seeds.bloodnoc.org _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|