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 19675C433EF for ; Sat, 27 Nov 2021 00:45:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 019FC6B0075; Fri, 26 Nov 2021 19:45:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F0C006B0078; Fri, 26 Nov 2021 19:45:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD43C6B007B; Fri, 26 Nov 2021 19:45:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id CEF4D6B0075 for ; Fri, 26 Nov 2021 19:45:33 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8E19B1856A1FA for ; Sat, 27 Nov 2021 00:45:23 +0000 (UTC) X-FDA: 78852866778.05.6FFAD93 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf27.hostedemail.com (Postfix) with ESMTP id 82D4F7000081 for ; Sat, 27 Nov 2021 00:45:21 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637973920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AgzppMsiijavabR8bvW5suyEIFjxfrt3sP7id6758Ck=; b=NLKBnci0g+oqYme7XRqvk2sJHYGzyx3x3/Y7MH5F4qYjQYmUDsPZdySG7UXXtqamlSFPJm Rc/kZR6Et/C909GUve6d9q4WVUGnZA1irz4REtHB3S3X0HbgCX8jyyMruZ58mhVCIZYNhz h4y7MExC0SFcLva00n1ivIMDzelLC3rsON+tQQiYyU9pT+zM1+m2HkDG183ZW4v5XB9WTV 5dYQHjV+t0ueQnglSMh/SVRogCWXMZGkL/qq9oJUposmUiLsi7e8+MY9n8tZj9iKLd3m+A XFWToWbYzbrSlInOHm+hxY1VsAxd+AHBc/5kgV8yau+NgR/xhRL/wH7Oh5AAmg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637973920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AgzppMsiijavabR8bvW5suyEIFjxfrt3sP7id6758Ck=; b=NEucaHVpQjoXPK0mmv9QRxCDi6eKvv+fZu/8SI7/O+H7rAa6MWvc2aPeN98OkFIRoqdUV4 XHYijCtV96T88mDQ== To: Peter Zijlstra 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 In-Reply-To: References: <20211122211327.5931-1-posk@google.com> <20211122211327.5931-4-posk@google.com> <20211124200822.GF721624@worktop.programming.kicks-ass.net> <87a6hqhbgh.ffs@tglx> Date: Sat, 27 Nov 2021 01:45:20 +0100 Message-ID: <87tufyfmu7.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Stat-Signature: 3jed864syky1yorj3rwsq85p53zjdsii X-Rspamd-Queue-Id: 82D4F7000081 X-Rspamd-Server: rspam07 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=NLKBnci0; dkim=pass header.d=linutronix.de header.s=2020e header.b=NEucaHVp; spf=pass (imf27.hostedemail.com: domain of tglx@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=tglx@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de X-HE-Tag: 1637973921-569622 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 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. Thanks, tglx