Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1501662
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: MD-RAID: Use seq_putc() in three status functions? |
| Date | 2016-10-17 09:50 +0200 |
| Message-ID | <staQi-wi-41@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <spjSa-2Un-39@gated-at.bofh.it> <ssOZs-3nb-27@gated-at.bofh.it> <ssWWZ-8mi-23@gated-at.bofh.it> <ssXgm-h3-21@gated-at.bofh.it> <st97Q-7NQ-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>>> Does it improve code? Does it improve anything? >> >> Yes. - I got such an impression. >> >> * Is it more efficient to call the function "seq_printf" for the desired data processing >> for a single character than to pass it to the function "" in a string? >> >> * Will the required data transfer shrink a bit for the affected functions because of >> such a change? >> > Which are questions _you_ should be able to answer. I wonder that the answers are not obvious for you already. Calling the function "seq_putc" will be more efficient than "seq_printf" in this case because of the following reasons. 1. How does the distribution look like for supported processor architectures where the data transfer for bytes (as a function call parameter) is faster than for (string) pointers? 2. Did anybody measure already how many the execution times can vary for these functions? 3. seq_printf() provides more functionality as this kind of programming interface was designed for a bigger purpose. How much do you care for consequences when such general functions are called with input data they were not designed for mainly? 4. The seq_putc() implementation is so simple. http://lxr.free-electrons.com/source/fs/seq_file.c?v=4.8#L657 Where do you get doubts about its efficiency for the data processing of a single character? > It's your patch, after all. Yes. - I published a special update suggestion once again. > Once you do (and prove that the answer is 'yes' to the above two > questions) the patch will be applied. How do you think about to share a bit more from your software development and testing experience? Which call frequencies do you observe for the affected functions? 1. raid1_status 2. raid10_status 3. raid5_status Regards, Markus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] MD-RAID: Use seq_putc() in three status functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-16 10:30 +0200
Re: [PATCH] MD-RAID: Use seq_putc() in three status functions Hannes Reinecke <hare@suse.de> - 2016-10-16 19:00 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-16 19:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-16 19:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 08:00 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 09:50 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 10:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 11:10 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 12:00 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 13:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 13:50 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 16:10 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 16:40 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 17:40 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-17 18:10 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 19:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-18 20:30 +0200
Re: MD-RAID: Use seq_putc() in three status functions? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-20 14:30 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Bernd Petrovitsch <bernd@petrovitsch.priv.at> - 2016-10-17 14:20 +0200
Re: MD-RAID: Use seq_putc() in three status functions? Hannes Reinecke <hare@suse.de> - 2016-10-17 16:10 +0200
csiph-web