Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753067AbdCOLyh (ORCPT ); Wed, 15 Mar 2017 07:54:37 -0400 Received: from mga09.intel.com ([134.134.136.24]:16553 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbdCOLyd (ORCPT ); Wed, 15 Mar 2017 07:54:33 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,168,1486454400"; d="scan'208";a="1142542152" Date: Wed, 15 Mar 2017 19:54:40 +0800 From: Aaron Lu To: Hillf Danton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "'Dave Hansen'" , "'Tim Chen'" , "'Andrew Morton'" , "'Ying Huang'" Subject: Re: [PATCH v2 2/5] mm: parallel free pages Message-ID: <20170315115440.GE2442@aaronlu.sh.intel.com> References: <1489568404-7817-1-git-send-email-aaron.lu@intel.com> <1489568404-7817-3-git-send-email-aaron.lu@intel.com> <0a2501d29d70$7eb0f530$7c12df90$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a2501d29d70$7eb0f530$7c12df90$@alibaba-inc.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1256 Lines: 43 On Wed, Mar 15, 2017 at 05:42:42PM +0800, Hillf Danton wrote: > > On March 15, 2017 5:00 PM Aaron Lu wrote: > > void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) > > { > > + struct batch_free_struct *batch_free, *n; > > + > s/*n/*next/ > > > tlb_flush_mmu(tlb); > > > > /* keep the page table cache within bounds */ > > check_pgt_cache(); > > > > + list_for_each_entry_safe(batch_free, n, &tlb->worker_list, list) { > > + flush_work(&batch_free->work); > > Not sure, list_del before free? I think this is a good idea, it makes code look saner. I just did a search of list_for_each_entry_safe and found list_del is usually(I didn't check every one of them) used before free. So I'll add that in the next revision, probably some days later in case there are other comments. Thanks for your time to review the patch. Regards, Aaron > > + kfree(batch_free); > > + } > > + > > tlb_flush_mmu_free_batches(tlb->local.next, true); > > tlb->local.next = NULL; > > } > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org