kgsl: make the alrgorithm a bit smarter.