From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1822C433EF for ; Mon, 29 Nov 2021 15:10:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 355FD6B006C; Mon, 29 Nov 2021 10:10:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 305266B0071; Mon, 29 Nov 2021 10:10:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CD886B0072; Mon, 29 Nov 2021 10:10:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 0D4646B006C for ; Mon, 29 Nov 2021 10:10:26 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CBB5C8A9BE for ; Mon, 29 Nov 2021 15:10:15 +0000 (UTC) X-FDA: 78862303590.03.EA080EC Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id 38700900744F for ; Mon, 29 Nov 2021 15:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cWeTh3Kjsmkogd+g2xT/H6uwopOz4RWKcLeCTh9XWLw=; b=UpyHob2nOzQlt3GLZwCXoCGNmH CW09OTiCAA/HVokLDKi3pRgrD4jw665wfDDThwS16JqjPB7aYSElZnfmJTEr87v1BvNXd/DhykjqQ IeW/hTFfRL8sKiUQUwnuVEOQosUkjvH4Tm5gUQ6/sLkT98ky3UBNe1cr3z70H/nUo1QLtZdxapsmZ NQ3sszydlEH27eXssHOQNK4NHIR0a2vE6SeKhPvOsIRHEdPSfs7UjFx3nGmux4H4gTfkSgKJLut3b 3/IOYR79C8Ve7yyXMRNKF0ux/leoY8VgcUujiQeK54iV3WKgDgMBHdKUq8ShjVgAGV2q7idrSgCON CW7lyQeg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mriE5-0082wV-2f; Mon, 29 Nov 2021 15:05:53 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BD222300235; Mon, 29 Nov 2021 16:05:52 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A28E72B2FCB2A; Mon, 29 Nov 2021 16:05:52 +0100 (CET) Date: Mon, 29 Nov 2021 16:05:52 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Peter Oskolkov , Ingo Molnar , Andrew Morton , Dave Hansen , Andy Lutomirski , Linux Memory Management List , Linux Kernel Mailing List , linux-api@vger.kernel.org, Paul Turner , Ben Segall , Peter Oskolkov , Andrei Vagin , Jann Horn , Thierry Delisle Subject: Re: [PATCH v0.9.1 3/6] sched/umcg: implement UMCG syscalls Message-ID: References: <20211122211327.5931-1-posk@google.com> <20211122211327.5931-4-posk@google.com> <20211124200822.GF721624@worktop.programming.kicks-ass.net> <87a6hqhbgh.ffs@tglx> <87tufyfmu7.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tufyfmu7.ffs@tglx> X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 38700900744F X-Stat-Signature: trzpw6enq9p1u48m1jf7n56o8jo6ejyz Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=UpyHob2n; dmarc=none; spf=none (imf29.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org X-HE-Tag: 1638198358-484495 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Nov 27, 2021 at 01:45:20AM +0100, Thomas Gleixner wrote: > On Fri, Nov 26 2021 at 22:59, Peter Zijlstra wrote: > > On Fri, Nov 26, 2021 at 10:08:14PM +0100, Thomas Gleixner wrote: > >> > + if (timo) > >> > + hrtimer_sleeper_start_expires(&timeout, HRTIMER_MODE_ABS); > >> > + > >> > + freezable_schedule(); > >> > >> You can replace the whole hrtimer foo with > >> > >> if (!schedule_hrtimeout_range_clock(timo ? &timo : NULL, > >> tsk->timer_slack_ns, > >> HRTIMER_MODE_ABS, > >> tsk->umcg_clock)) { > >> ret = -ETIMEOUT; > >> break; > >> } > > > > That seems to loose the freezable crud.. then again, since we're > > interruptible, that shouldn't matter. Lemme go do that. > > We could add a freezable wrapper for that if necessary. I should just finish rewriting that freezer crap and then we can delete it all :-) But I don't think that's needed in this case, as long as we're interruptible we'll pass through the signal path which has a try_to_freezer() in it.