From patchwork Mon Mar 30 12:34:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 11465447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D6181392 for ; Mon, 30 Mar 2020 12:34:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF6A5206E6 for ; Mon, 30 Mar 2020 12:34:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oO6sku2e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF6A5206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16C7C6E293; Mon, 30 Mar 2020 12:34:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id B63B96E293 for ; Mon, 30 Mar 2020 12:34:28 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id u10so21388015wro.7 for ; Mon, 30 Mar 2020 05:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=u+3XfmHb8XcWJW00eEnFgNAjnyuiI2NfFxirSGxT3Yg=; b=oO6sku2eLVAANr0kYa/zMX4CqQH7xzW3dT79E3JuRTwMaoHYyCA5646fnvrcj+Qp2Q 4XJy9FpXUd22hKKGxr37CsPFXlfOfxDrXdFIpGQdSBdz8+a0+J1K0i+plTLcgCjVSFBE YoM2vYwOH2+BwxwwnWI+9ZMuRUoZzFYJhof7TZCQKOdwHrTtOdoki8u4XotuINb3hRNw Uxrc1FE7cIt5cKAexF+16UFnjJ85u7Pe2WCbu3FVkKihaWeym1uPLqI9ff0WBB0V4g6q 63KFanGmE1b0jrIf+0ImL5Q11I2hH2ES+7d5FPoGlTWWg0KR2oMD3a3Fuh8gx+66ALM3 fcrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=u+3XfmHb8XcWJW00eEnFgNAjnyuiI2NfFxirSGxT3Yg=; b=aCI3cyWeGM91otCIlFye0vEtKBYNujXK0o1QFdgWsS67Bt9HwuQ/Jg2L1Y6rK2y/Yn VwCDAJN8fZVxg5NqELaXXCmNByLf5Qpt6bRJdwgsMauvdsTY0BKdoQai4rEgcm2UeTIZ iYJwWJOfywLr9iyDaF/rwbQsUkgHutsnfV5zEQBskLH4y5mckF0Sb9VOPMngdTG0HggK PcOU2z9406nQUM+MTw6fHnHNgQmJNd6s0wW+Gtw0izNrt7k0dBfPXj2E/ICEFiHsHlIh riWisRT7KxtsD5/EyGtxQPVooYdAYP7Q7IC651OW8mDbtJDKk+LxPh6U8Pmo44h9Qtvq oQLg== X-Gm-Message-State: ANhLgQ3t3BIEJA+ZiFaywbahnJqphCW3JLurmsVBRXOIcYNt3+3b+SOk dXbOPK3t9nwUbGHsjDayTolmsiTk X-Google-Smtp-Source: ADFU+vtO8M0aw7ZjK5XfFKdCdbiaeqbLbU1wluPlS5VqnuQLbh4Cm8S55U5oV7vCe9qTs6B0AUDrQQ== X-Received: by 2002:a5d:540c:: with SMTP id g12mr15547231wrv.178.1585571667360; Mon, 30 Mar 2020 05:34:27 -0700 (PDT) Received: from laptop.amd.com ([2a02:908:1252:fb60:be8a:bd56:1f94:86e7]) by smtp.gmail.com with ESMTPSA id g2sm22719933wrs.42.2020.03.30.05.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 05:34:26 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: chris@chris-wilson.co.uk, zbigniew.kempczynski@intel.com, andi.shyti@intel.com, joonas.lahtinen@linux.intel.com, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/mm: revert "Break long searches in fragmented address spaces" Date: Mon, 30 Mar 2020 14:34:25 +0200 Message-Id: <20200330123425.3944-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 7be1b9b8e9d1e9ef0342d2e001f44eec4030aa4d. The drm_mm is supposed to work in atomic context, so calling schedule() or in this case cond_resched() is illegal. Signed-off-by: Christian König Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_mm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index bc6e208949e8..8981abe8b7c9 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -367,11 +366,6 @@ next_hole(struct drm_mm *mm, struct drm_mm_node *node, enum drm_mm_insert_mode mode) { - /* Searching is slow; check if we ran out of time/patience */ - cond_resched(); - if (fatal_signal_pending(current)) - return NULL; - switch (mode) { default: case DRM_MM_INSERT_BEST: @@ -563,7 +557,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm, return 0; } - return signal_pending(current) ? -ERESTARTSYS : -ENOSPC; + return -ENOSPC; } EXPORT_SYMBOL(drm_mm_insert_node_in_range);