Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757550AbcDHHFb (ORCPT ); Fri, 8 Apr 2016 03:05:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:36359 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbcDHHFa (ORCPT ); Fri, 8 Apr 2016 03:05:30 -0400 Date: Fri, 8 Apr 2016 09:05:28 +0200 (CEST) From: Jiri Kosina X-X-Sender: jkosina@pobox.suse.cz To: Jessica Yu cc: Josh Poimboeuf , Miroslav Benes , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Vojtech Pavlik Subject: Re: sched: horrible way to detect whether a task has been preempted In-Reply-To: <20160407231512.GA27994@packer-debian-8-amd64.digitalocean.com> Message-ID: References: <24db5a6ae5b63dfcd2096a12d18e1399a351348e.1458933243.git.jpoimboe@redhat.com> <20160407211525.GB25804@packer-debian-8-amd64.digitalocean.com> <20160407231512.GA27994@packer-debian-8-amd64.digitalocean.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 16 On Thu, 7 Apr 2016, Jessica Yu wrote: > > Alternatively, without eating up a TIF_ space, it'd be possible to push a > > magic contents on top of the stack in preempt_schedule_irq() (and pop it > > once we are returning from there), and if such magic value is detected, we > > just don't bother and claim unreliability. > > Ah, but wouldn't we still have to walk through the frames (i.e. enter > the loop in patch 7/14) to look for the magic value in this approach? The idea was that it'd be located at a place to which saved stack pointer of the sleeping task is pointing to (or at a fixed offset from it). -- Jiri Kosina SUSE Labs