On 01/23/2017 04:47 PM, Omar Sandoval wrote: > From: Omar Sandoval <osandov@xxxxxx> > > In elevator_switch(), we free the old scheduler's tags and then > initialize the new scheduler. If initializing the new scheduler fails, > we fall back to the old scheduler, but our tags have already been freed. > There's no reason to free the sched_tags only to reallocate them, so > let's just reuse them, which makes it possible to safely fall back to > the old scheduler. Do we need a failure case on both ends? We never free the driver tags, so it's always perfectly safe to fall back to not running with a scheduler. Since we were talking about making the scheduler depth configurable or dependent on the scheduler, reusing tags seems like something that would potentially be a short lived "feature". So I think I'd prefer if we teardown/setup like we do now, and just have the failure case be falling back to "none". -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html