- 博客(116)
- 资源 (6)
- 收藏
- 关注
原创 服务器上PFC配置丢失问题排查与解决方案
机间通信使用RoCE网络,为了避免因丢包导致大量重传报文影响训练性能,我们基于PFC和ECN在交换机和服务器配置搭建了无损网络,理论上是不允许丢包的,现在出现交换机大量丢包,不知道是哪里配置不对。由于我们服务端启动了lldpad进程,但是未通过lldpad配置PFC,而是在服务端手动通过mlnx_qos配置,导致lldpad自动覆盖mlnx_qos的配置,所以出现了配置丢失的情况,使用原理没搞清楚。因此我们选用lldpd,既能获取端口的邻居关系又不影响现有PFC的配置,如何使用细节不描述了,见参考文档。
2024-09-16 21:53:02 536
原创 基于PFC和ECN搭建无损RoCE网络的工作流程分析
RDMA(Remote Direct Memory Access,远程直接内存访问)是一种为了解决网络传输中服务器端数据处理延迟而产生的技术。RDMA 将用户应用中的数据直接传入服务器的存储区,通过网络将数据从一个系统快速传输到远程系统的存储器中,消除了传输过程中多次数据复制和文本交换的操作,降低了 CPU 的负载。基于RDMA的RoCE技术能在以太网上部署,相比IB网络节省了很大的资源和复杂度。当前 RDMA普遍使用 RoCEv2 协议。
2024-08-03 23:50:12 1058
原创 72. Edit Distance
Given two stringsword1andword2, returnthe minimum number of operations required to convertword1toword2.You have the following three operations permitted on a word:Insert a character Delete a character Replace a characterExample 1:Input:...
2021-05-29 18:34:28 186
原创 516. Longest Palindromic Subsequence
516. Longest Palindromic SubsequenceGiven a strings, findthe longest palindromicsubsequence's length ins.Asubsequenceis a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaini...
2021-05-03 17:34:29 162
原创 337. House Robber III
337. House Robber IIIThe thief has found himself a new place for his thievery again. There is only one entrance to this area, calledroot.Besides theroot, each house has one and only one parent house. After a tour, the smart thief realized that all ho..
2021-04-23 23:10:34 129
原创 124. Binary Tree Maximum Path Sum
124.Binary Tree Maximum Path SumApathin a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequenceat most once. Note that the path does not need to pass t...
2021-04-23 00:04:53 154
转载 43. Multiply Strings
43.Multiply StringsGiven two non-negative integersnum1andnum2represented as strings, return the product ofnum1andnum2, also represented as a string.Note:You must not use any built-in BigInteger library or convert the inputs to integer directly...
2021-04-17 13:16:16 96 1
原创 316. Remove Duplicate Letters
316.Remove Duplicate LettersGiven a strings, remove duplicate letters so that every letter appears once and only once. You must make sure your result isthe smallest in lexicographical orderamong all possible results.Note:This question is the same ...
2021-04-17 11:50:34 89
转载 C++ pair和make_pair的应用与实现
pair 的用法std::pair主要的作用是将两个数据组合成一个数据,两个数据可以是同一类型或者不同类型。 C++标准程序库中凡是“必须返回两个值”的函数, 也都会利用pair对象。 class pair可以将两个值视为一个单元。容器类别map和multimap就是使用pairs来管理其健值/实值(key/value)的成对元素。 pair被定义为struct,因此可直接存取pair中的个别值.。 两个pairs互相比较时, 第一个元素正具有较高的优先级.。make_pair的用法无需写
2021-04-11 14:21:51 775
原创 662. Maximum Width of Binary Tree
662.Maximum Width of Binary TreeGiven a binary tree, write a function to get the maximum width of the given tree. The maximum width of a tree is the maximum width among all levels.The width of one level is defined as the length between the end-nodes (.
2021-04-11 12:47:21 75
原创 1367. Linked List in Binary Tree
1367. Linked List in Binary TreeGiven a binary treerootand alinked list withheadas the first node.Return True if all the elements in the linked list starting from theheadcorrespond to somedownward pathconnected in the binary treeotherwise re...
2021-04-11 11:29:24 94
原创 979. Distribute Coins in Binary Tree
979.Distribute Coins in Binary TreeYou are given therootof a binary tree withnnodes where eachnodein the tree hasnode.valcoins and there arencoins total.In one move, we may choose two adjacent nodes and move one coin from one node to another...
2021-04-11 00:02:51 103
原创 297. Serialize and Deserialize Binary Tree
297. Serialize and Deserialize Binary Treeerialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructe
2021-04-10 18:57:42 78
原创 538. Convert BST to Greater Tree
538.Convert BST to Greater TreeGiven therootof a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.As a reminder, a...
2021-04-10 16:50:14 74
原创 652. Find Duplicate Subtrees
652.Find Duplicate SubtreesGiven therootof a binary tree, return allduplicate subtrees.For each kind of duplicate subtrees, you only need to return the root node of anyoneof them.Two trees areduplicateif they have thesame structurewith the...
2021-04-10 15:54:26 85
原创 23. Merge k Sorted Lists
23. Merge k Sorted ListsYou are given an array ofklinked-listslists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.Example 1:Input: lists = [[1,4,5],[1,3,4],[2,6]]Output: ...
2021-04-09 00:07:13 101
原创 138. Copy List with Random Pointer
138.Copy List with Random PointerA linked list of lengthnis given such that each node contains an additional random pointer, which could point to any node in the list, ornull.Construct adeep copyof the list. The deep copy should consist of exactl...
2021-04-08 23:39:21 78
原创 148. Sort List
148.Sort ListGiven theheadof a linked list, returnthe list after sorting it inascending order.Follow up:Can you sort the linked list inO(n logn)time andO(1)memory (i.e. constant space)?Example 1:Input: head = [4,2,1,3]Output: [1,2,...
2021-04-08 23:18:45 163
转载 576. Out of Boundary Paths
576. Out of Boundary PathsThere is anmbyngrid with a ball. Given the start coordinate(i,j)of the ball, you can move the ball toadjacentcell or cross the grid boundary in four directions (up, down, left, right). However, you canat mostmoveNtim...
2020-08-13 01:03:03 124
转载 332. Reconstruct Itinerary
332.Reconstruct ItineraryGiven a list of airline tickets represented by pairs of departure and arrival airports[from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs fromJFK. Thus, the itinerary must begin with...
2020-08-08 00:28:56 141
原创 1530. Number of Good Leaf Nodes Pairs
1530. Number of Good Leaf Nodes PairsGiven therootof a binary tree and an integerdistance. A pair of two differentleafnodes of a binary tree is said to be good if the length ofthe shortest pathbetween them is less than or equal todistance.Retur...
2020-08-06 23:54:46 223
转载 132. Palindrome Partitioning II
132. Palindrome Partitioning II[LeetCode] Palindrome Partitioning II 拆分回文串之二Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs.Example:...
2020-07-18 22:46:01 125
转载 55. Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you are able to reach the last index.Example 1:Inp.
2020-07-04 12:41:30 123
转载 39. Combination Sum
Given asetof candidate numbers (candidates)(without duplicates)and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Thesamerepeated number may be chosen fromcandidatesunlimited number...
2020-07-04 09:38:13 148
原创 Send和Recv原理及常见问题分析
Send和Recv原理及常见问题分析Send函数int send( SOCKET s, const char FAR *buf, int len, int flags ); 不论是客户还是服务器应用程序都用send函数来向TCP连接的另一端发送数据。客户程序一般用send函数向服务器发送请求,而服务器则通常用send函数来向客户程序发送应答。参数说明:第一个参数指定发送端套接字描述...
2020-05-06 12:44:27 1628
转载 647. Palindromic Substrings
Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted as different substrings even they consist ...
2020-04-21 00:23:36 137
转载 494. Target Sum
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols+and-. For each integer, you should choose one from+and-as its new symbol.Find out how m...
2020-04-19 23:54:25 123
转载 [LeetCode] 416. Partition Equal Subset Sum
Given anon-emptyarray containingonly positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.Note:Each of the array eleme...
2020-04-19 23:24:38 122
转载 139. Word Break
Given anon-emptystringsand a dictionarywordDictcontaining a list ofnon-emptywords, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.Note:The ...
2020-04-12 21:21:34 206
转载 malloc与free的底层实现
1本节引言内存管理内幕Linux内存管理:Malloc本文引用了下面这篇文章,读完下面,应该读下上面两篇文章,其中,《内存管理内幕》提供了一个简单的malloc/free实现版本。看看它的free设计,相信有足够的吸引力(gnu free版本远比这复杂)该篇文章基本把malloc与free的实现机制说清楚了。但是有些陷藏的东西没说清楚。Malloc实际上有很多版本(DougLe...
2020-04-06 00:44:41 785
转载 操作系统-内存管理
文章目录一、内存管理1.1 内存的基础知识1.1.1 什么是内存,有何作用1.1.2 进程运行的原理-指令1.1.3 逻辑地址VS物理地址1.1.4 进程运行的基本原理(从写程序到程序运行)1.1.5 装入内存的三种方式1.1.5 链接的三种方式1.1.6 总结1.2 内存管理的概念1.2.1 内存空间的分配与回收1.2.2 内存空间的扩展1.2.3 地址转换1.2.4...
2020-04-05 19:08:34 151
转载 LeetCode 滑动窗口(Sliding Window)类问题总结
导语滑动窗口类问题是面试当中的高频题,问题本身其实并不复杂,但是实现起来细节思考非常的多,想着想着可能因为变量变化,指针移动等等问题,导致程序反复删来改去,有思路,但是程序写不出是这类问题最大的障碍。本文会将 LeetCode 里面的大部分滑动窗口问题分析、总结、分类,并提供一个可以参考的模版,相信可以有效减少面试当中的算法实现部分的不确定性。题目概览滑动窗口这类问题一般需要用到双...
2020-03-22 15:08:08 270
转载 322. Coin Change
322. Coin ChangeYou are given coins of different denominations and a total amount of moneyamount. Write a function to compute the fewest number of coins that you need to make up that amount. If tha...
2020-03-08 18:38:06 110
转载 硬币面值组合问题
转自:https://www.cnblogs.com/python27/p/3303721.html问题描述 假设我们有8种不同面值的硬币{1,2,5,10,20,50,100,200},用这些硬币组合够成一个给定的数值n。例如n=200,那么一种可能的组合方式为 200 = 3 * 1 + 1*2 + 1*5 + 2*20 + 1 * 50 + 1 * 100. 问总过有多少种可能的组...
2020-03-08 16:11:32 1093
转载 LeetCode-DP算法 | 最长公共子序列和最长公共子串区别
转自:https://blog.csdn.net/u012426298/article/details/82796660最长公共子串(Longest Common Substring)与最长公共子序列(Longest Common Subsequence)的区别: 子串要求在原字符串中是连续的,而子序列则只需保持相对顺序一致,并不要求连续。例如X = {a, Q, 1, 1}; Y = {a,...
2020-03-08 13:55:33 308
原创 560. Subarray Sum Equals K
560. Subarray Sum Equals KGiven an array of integers and an integerk, you need to find the total number of continuous subarrays whose sum equals tok.Example 1:Input:nums = [1,1,1], k = 2Outp...
2020-03-08 00:27:01 125
原创 Leetcode 309. Best Time to Buy and Sell Stock with Cooldown
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one ...
2020-01-15 00:05:07 118
原创 Leetcode 121. Best Time to Buy and Sell Stock I II
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock),...
2020-01-12 21:48:31 142
会声会影安装向导尚未完成错误-9 - 修复工具
2016-02-17
Notepad++中的格式化插件-NppAStyle
2015-08-16
ChipGenius_v4_00_0027_pre2
2014-12-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人