A development blog of what Con Kolivas is doing with code at the moment with the emphasis on linux kernel, MuQSS, BFS and -ck.

Sunday, 23 July 2017

Electric distraction

I'm sorry to say that I've been very distracted of late and haven't had time to look at the kernel (or any other code for that matter) and should explain why the resync with 4.12 has been delayed. I've been away on vacation and when I returned I was busily preparing for my new arrival and here I am taking delivery of it:

Honestly I can't recall ever looking forward to getting a vehicle so much... or any purchase really in my life. It really is an amazing change from a regular car and ticks every box I could possibly want in a car. Being part greenie, part geek and part hoon, it fulfils all the criteria and more. I was going to say petrolhead but that doesn't work here so I'm going to invent a new term and call myself an electrichead (???). So far it has reached and exceeded all my expectations which is really something given how much I was hoping for.

To answer the question that some of you may have knowing my history in the bitcoin space, yes I did pay for this (indirectly) with bitcoin. @Tesla, ElonMusk and Paypal, when will you start accepting bitcoin directly?

Now if anyone else is passionate about cars, electric vehicles, Tesla, the Model S, Model X or Model 3 and is interested in buying one, I'm going to do us both a favour and sneak my referral code into this blogpost. When purchasing a new Tesla vehicle there is no way to get a discount on a new car. They never hold specials, they never negotiate at the dealership, don't provide discounts to employees and don't even provide discount to bulk fleet purchases on a new car. They only ever discount used, demo or discontinued versions of their vehicles.

The only way to get a discount on a new vehicle is with a referral code from someone who purchased one and there isn't even any need to know the person, just their referral code. What does the referral code provide? A $1400 AUD discount (or $1000 USD) and unlimited free supercharging. The referral code I'm providing here can be used on any Tesla model worldwide to obtain those discounts and you're welcome to use it. I get a referral credit towards the purchase of my next vehicle in return so I'm happy for anyone to use it:

The code is con464 obviously if you're not placing your purchase online.

Now I better get back to work on the kernel you're all waiting for. Sorry about the offtopic post and plug, but nothing can contain my excitement. Realistically the next kernel is still probably a week away.

CONFIG_SCSI_MQ_DEFAULT=yCONFIG_DM_MQ_DEFAULT=y# there still no MQ_DEFAULT_IOSCHED so disable other MQ schedulersCONFIG_MQ_IOSCHED_DEADLINE=nCONFIG_MQ_IOSCHED_KYBER=n# despite the name it's actually mq-bfqCONFIG_IOSCHED_BFQ=y# probably this too#BFQ_GROUP_IOSCHED=y

I've already congratulated you with this new awesome piece of engineering, but now I have a bugreport :).

It seems that there's some race between sched_setaffinity() and skiplist_insert() in MuQSS. I've prepared a initrd-based reproducer, compiled kernel, vmlinux with debug symbols and also captured 2 vmcores for analysis in "crash" utility. Please check these here:

https://natalenko.name/myfiles/muqss_crash/

There is README file explaining how to launch a reproducer.

In short: reproducer spawns some amount of threads and sets an affinity on those threads (1 thread per core). While stressing spawning/setting affinity reproducer occasionally triggers NULL pointer dereference in kernel's skiplist_insert(). Usually it takes ≈1 minute to trigger a crash on my machine.

Please consider this while porting -ck to 4.12.

Also, there's similar issue with VRQ. I've already sent similar report to Alfred, and he's working on it. Please check our discussion here:

…just an update to previous comment: the issue was first triggered by "ag" search tool, hanging both my personal and work laptop. Then, I've checked "ag" source code and wrote a simpler reproducer available via the link above.