Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1366371pxu; Thu, 8 Oct 2020 09:44:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/sj0nZV8i+x06fXLh8WHk8n6TFLlNNTXwBLfEvEneYfL/LqGEoMR7ew7XLLw9bzc1qC1j X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr9724716ejk.250.1602175456895; Thu, 08 Oct 2020 09:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602175456; cv=none; d=google.com; s=arc-20160816; b=VbVLJ9MRmDWY/vG1lPF2fl+2NQDoHiHOjA2tFTvzb9DdH9zfjrh/6/gds5SKKqph6d FOpBa/wu8TA0qMeu0rgkj3QRXL/dBIdjWNzxX13tuS7cV/h1wJXK+Ps+KbvY+P7zZi0t XJZ+n4qPt20Tjm0D9PV8xpS+oC8sOGKrkAMApOTGCjJYJfKkVGaDZ/TJkJu1iLx2GiwW WAXDSqjNk2aRgtdDHg1SIOugvmeSftzjyNPug7+yHs7npcCpbabFk82B7xvpBMxzsWda YsOTsPS6ZWqAGod0onFmKF6TEZ2feFaVTQpINYefJ3w+ONbi5ZAcnrujPap7npx9XHRw V0gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=X1kaHWBHLF6as3Dsn7xHzXIh9cJ3AkogIyQtrQFgTrw=; b=UiVrkh0jEnBj8T53NIfJ2S1KG7YBqHhHJfWAkuxUcyeUTvhkDED/38ioKoN0vgzTFu W2vtg4Qy3gtnMeEXsgRAmT+HhZ1Pnsjq+/LUAXG983zooR0EmrWYFAsMHysiV00areDV RLjG0jjFq0x9ZO8upiPcfNCc98v4EgKDpPX+i3WcgZFtY6gtecPIwt8MW/3cW65rgIUu 6k3/ch/0Swf/G/ZjOZbGbsbfnN23wYgwaA5Y+1GU8GdFae+J60ySt5cycca9a4uQOKrk /61Ze3FvV8VrzDzJKFV+yl64Io4OnPkyjb4Uy1pTDN1osNyZFIsWSpttFjQFj5RIKO31 +moA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aL5VI4R8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si4891226ejh.440.2020.10.08.09.43.53; Thu, 08 Oct 2020 09:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aL5VI4R8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730645AbgJHOpt (ORCPT + 99 others); Thu, 8 Oct 2020 10:45:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42635 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729828AbgJHOps (ORCPT ); Thu, 8 Oct 2020 10:45:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602168347; 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=X1kaHWBHLF6as3Dsn7xHzXIh9cJ3AkogIyQtrQFgTrw=; b=aL5VI4R8Ljg0LnQEWdhIkGUffxemDL310B3CcmQ6XmQdqot7GFhBuuYOdXrD8ivIZZmfPx BawjtVXKn4OwYSu2vBvql6CnVb18zmXr/0C0sKesuq0S+JCGQMLyZ7k6lEtOsGRPjeDAc5 65MAi8Rn3ygpEHjsyUfLNnN0sDJPgWc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-iuDgOWNRPRyInvvnGfhOxw-1; Thu, 08 Oct 2020 10:45:44 -0400 X-MC-Unique: iuDgOWNRPRyInvvnGfhOxw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE42D18BE169; Thu, 8 Oct 2020 14:45:42 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.132]) by smtp.corp.redhat.com (Postfix) with SMTP id 4FA9376648; Thu, 8 Oct 2020 14:45:41 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 8 Oct 2020 16:45:42 +0200 (CEST) Date: Thu, 8 Oct 2020 16:45:40 +0200 From: Oleg Nesterov To: Jens Axboe Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de Subject: Re: [PATCH 3/6] kernel: split syscall restart from signal handling Message-ID: <20201008144539.GJ9995@redhat.com> References: <20201005150438.6628-1-axboe@kernel.dk> <20201005150438.6628-4-axboe@kernel.dk> <20201008142135.GH9995@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08, Jens Axboe wrote: > > On 10/8/20 8:21 AM, Oleg Nesterov wrote: > > > > Can't we avoid this patch and the and simplify the change in > > exit_to_user_mode_loop() from the next patch? Can't the much more simple > > patch below work? > > > > Then later we can even change arch_do_signal() to accept the additional > > argument, ti_work, so that it can use ti_work & TIF_NOTIFY_SIGNAL/SIGPENDING > > instead of test_thread_flag/task_sigpending. > > Yeah I guess that would be a bit simpler, maybe I'm too focused on > decoupling the two. But if we go this route, and avoid sighand->lock for > just having TIF_NOTIFY_SIGNAL set, then that should be functionally > equivalent as far as I'm concerned. Not sure I understand... I think that the change I propose is functionally equivalent or I missed something. > I'll make the reduction, I'd prefer to keep this as small/simple as > possible initially. Great, thanks. Oleg.