2,497,741 events, 1,161,061 push events, 1,878,497 commit messages, 131,736,854 characters
ZEN: Implement zen-tune v4.20 over v4.14-arm64
4.9: In a surprising turn of events, while benchmarking and testing hierarchical scheduling with BFQ + writeback throttling, it turns out that raising the number of requests in queue actually improves responsiveness and completely eliminates the random stalls that would normally occur without hierarchical scheduling.
To make this test more intense, I used the following test:
Rotational disk1: rsync -a /source/of/data /target/to/disk1 Rotational disk2: rsync -a /source/of/data /target/to/disk2
And periodically attempted to write super fast with: dd if=/dev/zero of=/target/to/disk1/block bs=4096
This wrote 10gb incredibly fast to writeback and I encountered zero stalls through this entire test of 10-15 minutes.
My suspicion is that with cgroups, BFQ is more able to properly sort among multiple drives, reducing the chance of a starved process. This plus writeback throttling completely eliminate any outstanding bugs with high writeback ratios, letting the user enjoy low latency writes (application thinks they're already done), and super high throughput due to batched writes in writeback.
Please note however, without the following configuration, I cannot guarantee you will not get stalls:
CONFIG_BLK_CGROUP=y CONFIG_CGROUP_WRITEBACK=y CONFIG_IOSCHED_CFQ=y CONFIG_CFQ_GROUP_IOSCHED=y CONFIG_IOSCHED_BFQ=y CONFIG_BFQ_GROUP_IOSCHED=y CONFIG_DEFAULT_BFQ=y CONFIG_SCSI_MQ_DEFAULT=n
Special thanks to h2, author of smxi and inxi, for providing evidence that a configuration specific to Debian did not cause stalls found the Liquorix kernels under heavy IO load. This specific configuration turned out to be hierarchical scheduling on CFQ (thus, BFQ as well).
4.10: During some personal testing with the Dolphin emulator, MuQSS has serious problems scaling its frequencies causing poor performance where boosting the CPU frequencies would have fixed them. Reducing the up_threshold to 45 with MuQSS appears to fix the issue, letting the introduction to "Star Wars: Rogue Leader" run at 100% speed versus about 80% on my test system.
Also, lets refactor the definitions and include some indentation to help the reader discern what the scope of all the macros are.
4.11: Increase MICRO_FREQUENCY_UP_THRESHOLD from 95 to 85 Increase MIN_FREQUENCY_UP_THRESHOLD from 11 to 6
These changes should help make using CFS feel a bit more responsive when working with mostly idle workloads, browsing the web, scrolling through text, etc.
Increasing the minimum frequency up threshold to 6% may be too aggressive though. Will revert this setting if it causes significant battery drain.
4.12: Make bfq the default MQ scheduler
Reduce default sampling down factor from 10 to 1
With the world eventually moving to a more laptop heavy configuration, it's getting more important that we can reduce our frequencies quickly after performing work. This is normal with a ton of background processes that need to perform burst work then sleep.
Since this doesn't really impact performance too much, lets not keep it part of ZEN_INTERACTIVE.
Some time ago, the minimum frequency up threshold was set to 1 by default, but the zen configuration was never updated to take advantage of it.
Remove custom MIN_FREQUENCY_UP_THRESHOLD for MuQSS / ZEN_INTERACTIVE configurations and make 1 the default for all choices.
4.18: Prefer bfq-mq when available if zen interactive is enabled
The bfq-mq elevator is typically one major kernel version ahead in optimizations and bug fixes due to early access patches in the algodev/bfq-mq github repository. Since these patches are typically low risk and almost always improve performance and/or increase stability, prefer bfq-mq over bfq when available.
Switch from MuQSS to PDS-mq.
4.19: Switch from PDS-mq back to MuQSS
4.20: During some experimentation to influence MuQSS into consolidating strong single threaded workloads to single cores, I found that the up_threshold just ends up forcing all cores to run at a higher frequency.
Instead, raising up_threshold back to defaults (95 with micro sampling), and raising the sampling down factor to 5, the individual cores MuQSS selects (typically the first few), tend to properly stick to their max speed and because they complete their tasks faster, MuQSS selects them again to for the earliest eligible deadline, causing a reciprocal cycle that improves single thread performance.
Completely fair scheduler (CFS), never really had this issue, but we'll leave sampling down factor high with CONFIG_ZEN_INTERACTIVE since it'll benefit CFS users that want higher performance anyway.
Raise minimum CFS latency to 4ms to match 250hz configs. Raise minimum MuQSS latency to 4ms to match 250hz configs.
Use [defer+madvise] as default khugepaged defrag strategy:
For some reason, the default strategy to respond to THP fault fallbacks is still just madvise, meaning stall if the program wants transparent hugepages, but don't trigger a background reclaim / compaction if THP begins to fail allocations. This creates a snowball affect where we still use the THP code paths, but we almost always fail once a system has been active and busy for a while.
The option "defer" was created for interactive systems where THP can still improve performance. If we have to fallback to a regular page due to an allocation failure or anything else, we will trigger a background reclaim and compaction so future THP attempts succeed and previous attempts eventually have their smaller pages combined without stalling running applications.
We still want madvise to stall applications that explicitely want THP, so defer+madvise does make a ton of sense. Make it the default for interactive systems, especially if the kernel maintainer left transparent hugepages on "always".
Reasoning and details in the original patch: https://lwn.net/Articles/711248/
Add a scheduler even to multi-queue block devices: We prefer interactivity to throughput and want BFQ if possible.
Signed-off-by: Albert I [email protected] Signed-off-by: Udit Karode [email protected]
Love_letter_mystery_statement
Love-Letter Mystery
James found a love letter that his friend Harry has written to his girlfriend. James is a prankster, so he decides to meddle with the letter. He changes all the words in the letter into palindromes.
To do this, he follows two rules:
- He can only reduce the value of a letter by 1, i.e. he can change d to c, but he cannot change c to d or d to b.
- The letter 'a' may not be reduced any further.
Each reduction in the value of any letter is counted as a single operation. Find the minimum number of operations required to convert a given string into a palindrome.
For example, given the string s=cde, the following two operations are performed: cde → cdd → cdc.
Function Description: Complete the theLoveLetterMystery function in the editor below. It should return the integer representing the minimum number of operations needed to make the string a palindrome.
theLoveLetterMystery ( ) has the following parameter(s): s: a string
https://www.hackerrank.com/contests/target-codevita-2/challenges/the-love-letter-mystery
doesn't fucking work that stupid motherfucker shit
FUCK YOU DOCKER FUCK YOU SHITTY TESTS YOU DESERVE TO VISIT SATAN
Create Dubstep
Polycarpus works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of old songs and make dubstep remixes from them.
Let's assume that a song consists of some number of words (that don't contain WUB). To make the dubstep remix of this song, Polycarpus inserts a certain number of words "WUB" before the first word of the song (the number may be zero), after the last word (the number may be zero), and between words (at least one between any pair of neighbouring words), and then the boy glues together all the words, including "WUB", in one string and plays the song at the club.
For example, a song with words "I AM X" can transform into a dubstep remix as "WUBWUBIWUBAMWUBWUBX" and cannot transform into "WUBWUBIAMWUBX".
Recently, Jonny has heard Polycarpus's new dubstep track, but since he isn't into modern music, he decided to find out what was the initial song that Polycarpus remixed. Help Jonny restore the original song.
Input The input consists of a single non-empty string, consisting only of uppercase English letters, the string's length doesn't exceed 200 characters
Output Return the words of the initial song that Polycarpus used to make a dubsteb remix. Separate the words with a space.
Examples songDecoder("WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB") // => WE ARE THE CHAMPIONS MY FRIEND
Remove defaults from internal functions.
We already pass all parameters, no need for defaults. By removing the defaults I can get an error out of the interpreter when I forget to pass a parameter.
Also exposes the power_min
parameter in clipping.threshold. I'm
having a hard time describing it well though, It specifies that power
must be greater than power_min
times the median of the
power_quantile
quantile of power at each minute of the day,
excluding night, and early morning/late evening.
Fix spacing typo in the README
As I believe in the greater good of the English language and the development of documentation as the foundation for a tremendous future, I decided to fix a small typo in your README.
In English, there is no space before a colon. This is a common mistake for French speakers since it is the case in this weird language. However you might want to know that it is one of the unique characteristic of French typesetting. You can read more about this here.
Each typo fixed saves another child in the world. It is a direct consequence of quantum physics and the butterfly effect. There's a great movie that talks about it where the main character goes back in time and changes little things and lives the consequences. It's called the Butterfly Effect.
You know, I don't believe we should bring philosophy in the discussion but I don't think we have a choice. Whether or not this PR is useful or not is highly subjective and nobody should be judged so harshly, so fast.
What if, for example, the President Of The United States decided to use Kamaï to rediscover Computer Science.
What if he decided that it would become the universal programming language. Right there, overnight.
By morning, everyone on earth would read this README and notice this spacing error. They would think "Wow, that's not a native speaker!" and since they're American, nukes would be involved.
Think of the children. Think of the mothers. Think of your ancestors. All thoses people that brought you there to live what you want to live.
Do you want to deceive all of humanity with a spacing error ? I don't think you do. Thus I think you want to merge this PR.
Thank you.
magnum-plugins: use meshoptimizer that works on old Apple Clangs.
Fuck you, Apple.
Remove invalid options/mismatched types to prevent the catastrophe that happened today fucking hell that was pain
Created Text For URL [www.theguardian.com/lifeandstyle/2020/may/29/i-love-the-smell-of-coffee-morning-evening-and-night-maybe-its-time-to-cut-down]
okay I am like messing up the git history (read body)
if you're reading this that means somehow you can see the git history after I squash all of it down, which is surprising
anyway, sorry you have to see my horrible commit messages.
luv u :)
p.s. u r a very cool person
🔥 grrr, i can't have a file's modifications ignored but have it on the remote. fuck you git